-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add build-web-bot-auth CLI command #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Mesa DescriptionSummaryAdds support for building Cloudflare's Web Bot Auth browser extension directly from the Kernel CLI.
Usage# Build with default test key
kernel extensions build-web-bot-auth --to ./web-bot-auth-ext
# Build with custom key and upload
kernel extensions build-web-bot-auth --to ./web-bot-auth-ext --key ./my-key.jwk --upload
# Build with custom name
kernel extensions build-web-bot-auth --to ./web-bot-auth-ext --upload --name my-company-botWhy we made these changesThis feature allows users to build Cloudflare's Web Bot Auth browser extension directly from the Kernel CLI, streamlining the process of creating and deploying custom browser extensions for bot authentication. This enhances the utility of the Kernel CLI for managing browser-based automation and security. What changed?
Validation
Description generated by Mesa. Update settings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Performed full review of 5d277a1...2b0dc71
Analysis
-
Path Traversal Protection Bug: Security vulnerability in the
extractTarGzfunction where the condition incorrectly rejects the destination directory itself, causing extraction failures. -
Resource Leakage: Test script calls
process.exit(1)in catch blocks, preventing the execution of cleanup code in finally blocks, potentially leaking browser resources. -
Context Management Issues: HTTP downloads use
http.Get()instead of context-aware requests, preventing proper timeout and cancellation handling. -
Error Handling Gaps: Several error conditions are silently ignored, including directory read errors that could mask permission issues while proceeding with incorrect assumptions.
-
External Dependencies Risk: Build process relies on GitHub availability and npm toolchain with a hardcoded reference to the 'main' branch, creating stability risks without version pinning or integrity verification.
Tip
Help
Slash Commands:
/review- Request a full code review/review latest- Review only changes since the last review/describe- Generate PR description. This will update the PR body or issue comment depending on your configuration/help- Get help with Mesa commands and configuration options
2 files reviewed | 0 comments | Edit Agent Settings • Read Docs
Add a new `kernel extensions build-web-bot-auth` command that: - Downloads Cloudflare's web-bot-auth browser extension from GitHub - Builds it with a configurable Ed25519 signing key (defaults to RFC9421 test key) - Optionally uploads the built extension to Kernel Also adds a test script (scripts/test-web-bot-auth.ts) for verifying the extension works against Cloudflare's test site.
2b0dc71 to
e271fbc
Compare
Summary
Adds support for building Cloudflare's Web Bot Auth browser extension directly from the Kernel CLI.
kernel extensions build-web-bot-auth--uploadflag to upload directly to Kernelscripts/test-web-bot-auth.tsfor verifying the extension worksUsage
Test plan