security: verify init template integrity by euyua9 · Pull Request #4723 · browser-use/browser-use · GitHub
Skip to content

security: verify init template integrity#4723

Open
euyua9 wants to merge 1 commit intobrowser-use:mainfrom
euyua9:sysa/browser-use-init-template-integrity-20260422
Open

security: verify init template integrity#4723
euyua9 wants to merge 1 commit intobrowser-use:mainfrom
euyua9:sysa/browser-use-init-template-integrity-20260422

Conversation

@euyua9
Copy link
Copy Markdown

@euyua9 euyua9 commented Apr 21, 2026

Summary

  • pin the init template catalog in-package instead of downloading templates.json at runtime
  • verify every downloaded template file against pinned SHA-256 hashes before writing it to disk
  • add regression tests for trusted manifest usage and integrity mismatch rejection

Testing

  • python3 -m py_compile browser_use/init_cmd.py browser_use/init_template_manifest.py test_init_template_integrity.py
  • python3 -m pytest test_init_template_integrity.py

Summary by cubic

Pins the init template manifest inside browser_use and verifies SHA-256 for every downloaded template file to block tampering. Removes the runtime templates.json fetch and makes the init command work offline for the catalog.

  • New Features
    • Ship trusted template catalog and hashes in browser_use/init_template_manifest.py.
    • Verify each downloaded file via SHA-256; reject on mismatch or missing hash.
    • CLI listing now reads the pinned manifest instead of fetching from GitHub.
    • Add tests covering manifest usage and integrity mismatch handling.

Written for commit 0a7cd93. Summary will update on new commits.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 3 files

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.

1 participant