fix: security hardening across CLI#104
Merged
Merged
Conversation
- Sandbox RuleContext file operations to project root (path traversal + symlink protection) - Set credentials file permissions to 0600 - URL-encode credentials in marketplace URLs - Validate tar archive entries before extraction (plugin-install + binary-upgrade) - Disable HTTP redirects on security-sensitive fetch endpoints - Add SHA256 checksum generation to release workflow and verification on download - Add PII consent prompt before signup - Wrap JSON.parse in try-catch for corrupted settings files - Use path.join() instead of template string concatenation in adr/list - Add security documentation page (EN + PT-BR)
Deploying archgate-cli with
|
| Latest commit: |
fec0f68
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e065967e.archgate-cli.pages.dev |
| Branch Preview URL: | https://worktree-nifty-singing-swing.archgate-cli.pages.dev |
10 tests covering the full loadRuleAdrs → runChecks pipeline with on-disk .rules.ts files attempting path traversal, absolute paths, glob escapes, symlink following, and legitimate access.
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.
Summary
readFile,readJSON,grep,grepFiles,glob) validate paths stay within project root. Blocks../traversal, absolute paths, cross-drive access (Windows), and symlinks.~/.archgate/credentialswritten with0600permissions.encodeURIComponent()applied to credentials in marketplace URLs.redirect: "error"on token claim, signup, and plugin download endpoints..sha256files per artifact;archgate upgradeverifies checksums on download.claude-settings.tswraps JSON parse in try-catch.adr/list.tsusespath.join()instead of template string concatenation.Test plan
bun run validatepasses (lint, typecheck, format, 437 tests, 21 ADR rules, build)tests/engine/runner-security.test.tscovers path traversal, absolute paths, glob traversal, symlink rejection, and cross-drive access (7 tests)archgate checkpasses against the project's own ADRs