Skip to content

Security hardening and improvements - #9

Merged
diegoos merged 10 commits into
mainfrom
chore/security-hardening
Aug 2, 2026
Merged

Security hardening and improvements#9
diegoos merged 10 commits into
mainfrom
chore/security-hardening

Conversation

@diegoos

@diegoos diegoos commented Aug 2, 2026

Copy link
Copy Markdown
Owner

No description provided.

diegoos added 10 commits August 2, 2026 14:08
- 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.
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedmarkdownlint-cli@​0.45.09910010085100

View full report

@diegoos
diegoos merged commit c36338e into main Aug 2, 2026
7 checks passed
@diegoos
diegoos deleted the chore/security-hardening branch August 2, 2026 22:05
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