Skip to content

Conversation

@archandatta
Copy link
Contributor

@archandatta archandatta commented Jan 6, 2026

Note

Adds a new CLI flow to fetch, build, and package Cloudflare’s web-bot-auth browser extension with Kernel-specific configs, plus supporting utils and tests.

  • New kernel extensions build-web-bot-auth command in cmd/extensions.go with flags --to, --url, --key, --upload; can auto-upload to Kernel under a specified name
  • Implements build pipeline in pkg/extensions/webbotauth.go: downloads GitHub archive, validates/converts Ed25519 keys (JWK/PEM), modifies policy/build templates, runs npm install/build/bundle, extracts extension ID, and copies artifacts (.crx, update.xml, policy, built files) to output
  • Adds crypto helpers in pkg/util/crypto.go (ValidatePEMKey, IsPEMKey, ConvertJWKToPEM) and file ops in pkg/util/fileops.go (CopyFile, CopyDir, ModifyFile)
  • New tests: download/extract integration in pkg/extensions/webbotauth_test.go and crypto unit tests in pkg/util/crypto_test.go

Written by Cursor Bugbot for commit 5268e7a. This will update automatically on new commits. Configure here.

@archandatta archandatta marked this pull request as ready for review January 7, 2026 16:08
@archandatta archandatta requested a review from rgarcia January 7, 2026 17:46
@archandatta archandatta force-pushed the archand/add-support/web-bot-auth branch from 01fb400 to 6380ccd Compare January 9, 2026 18:20
Copy link
Contributor

@rgarcia rgarcia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good feature addition! The overall structure is clean and the UX is thoughtful with helpful next-steps messaging.

Main areas to address:

  • JWK vs PEM messaging: Several places in help text, logs, and comments refer to "JWK" but PEM format is also supported. Would be good to make this consistent.
  • Error handling: A few places where os.Stat errors other than IsNotExist are silently ignored, and some URL update failures are warnings instead of errors.
  • Stability: Consider pinning the GitHub download to a specific commit to avoid upstream breaking changes.
  • Crypto code: The stdlib already has crypto/x509.MarshalPKCS8PrivateKey for Ed25519 - no need to hand-roll ASN.1.

@archandatta archandatta requested a review from rgarcia January 12, 2026 16:50
Copy link
Contributor

@rgarcia rgarcia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - nice work on the crypto refactor to use stdlib and good test coverage. just a few minor nits.

@archandatta archandatta merged commit cfda96e into main Jan 12, 2026
2 checks passed
@archandatta archandatta deleted the archand/add-support/web-bot-auth branch January 12, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants