Security hardening and improvements - #9
Merged
Conversation
- Updated `CHANGELOG.md` to reflect new security measures, including validation of external session binding IDs and improved handling of project root selection. - Modified `package.json` to change the `prepublishOnly` script to run `bun run check` for better validation before publishing. - Enhanced `SECURITY.md` with guidance on publishing practices and the importance of avoiding `npm publish --ignore-scripts`. - Improved hook scripts to ensure they validate session IDs and prefer project environment settings over stdin for directory selection. - Added tests to verify security measures against invalid session IDs and ensure proper behavior when using stdin for project directories.
- Added `markdownlint-cli` as a dev dependency for improved markdown linting. - Updated `package.json` to streamline the `lint:md` script using `bunx`. - Modified CI workflow to pin actions and ensure consistent environment setup, including specific Bun and Node versions. - Introduced a new test suite for verifying the parity of environment allowlist keys between CLI constants and OpenCode plugin. - Enhanced existing tests to validate security measures against invalid session IDs and ensure proper handling of project directories.
- Updated `CHANGELOG.md` to document improvements in session ID validation and environment variable handling. - Revised `SECURITY.md` to clarify environment forwarding rules, emphasizing the use of exact keys for locale settings. - Modified various scripts to ensure only validated session IDs are processed and to prevent option smuggling in git commands. - Enhanced tests to verify the validation of `last_processed_head` as a hex SHA and the preference for `--end-of-options` in git diff commands. - Improved documentation in `sync.md` to reflect new validation requirements for session IDs and git operations.
- Updated `AGENTS.md` to improve clarity on package manager verification steps. - Enhanced `CHANGELOG.md` with detailed notes on session ID handling improvements in hooks, emphasizing the preference for harness stdin over inherited environment variables. - Revised `SECURITY.md` to clarify the handling of session IDs and the importance of validating them before use. - Modified `package.json` to adjust the order of commands in the `check` script for better validation flow. - Improved hook scripts to ensure they prioritize valid session IDs from stdin and document the changes in the corresponding files. - Expanded tests to verify the new session handling logic and ensure proper behavior under various conditions.
Weak cd/pwd fallback skipped symlink resolution; a malicious .agents/memory symlink could write .hook-sync-state outside the project. Prune dead path-merge helpers and rename persist_session_id while touching common.sh.
Share firstBindingId/bindingScopes between session and conversation parsers; iterate ENV_ALLOWLIST_EXACT directly when building child env.
Drop unused HARNESS_SET export, move fs-install helpers local, and rebuild bin/cli.js.
…rompts - Removed unused functions and variables related to multiple harness installations. - Consolidated installation prompts for skill and hooks into a single selection process. - Improved error handling and output messages for better user experience. - Introduced a new function to resolve real paths, enhancing directory handling in scripts. - Updated installation scripts to ensure consistent behavior across different harness types.
- Added editorial improvements to `instructions.md`, `SKILL.md`, and `init.md` for clarity and consistency. - Updated `CHANGELOG.md` to reflect recent changes and improvements in the skill's documentation. - Enhanced `SECURITY.md` to clarify the hooks installer's behavior when `realpath` or `python3` is unavailable, ensuring it fails closed. - Improved `install-hooks.sh` to enforce the requirement for `realpath` or `python3` and provide appropriate error messages. - Added tests to verify the installer fails correctly when dependencies are missing.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.