Repository navigation
fix(security): harden secret sanitizer boundaries and safe path exclusions (#116) - #203
Merged
dan-petty merged 3 commits intoSep 14, 2026
Merged
Conversation
dan-petty
force-pushed
the
fix/116-secret-sanitizer-word-boundaries
branch
from
September 14, 2026 03:12
232fd01 to
9743295
Compare
dan-petty
marked this pull request as ready for review
September 14, 2026 12:27
There was a problem hiding this comment.
🟡 Changes recommended
Address the sanitizer leakage and length-boundary issues, add command-level draft assertions, and synchronize task statuses.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This PR hardens secret sanitization and makes release pull requests draft by default.
Changes:
- Updates secret boundaries and path/extension exclusions.
- Adds
--draft/--no-draftrelease options and refactors PR creation. - Updates tests, documentation, lockfile, and task tracking.
File summaries
| File | Description |
|---|---|
uv.lock |
Updates package version. |
tests/test_release.py |
Tests release draft options. |
tests/test_consolidation_security_sanitizer.py |
Adds sanitizer regression coverage. |
src/devops_cli/security/sanitizer.py |
Changes secret matching boundaries and exclusions. |
src/devops_cli/commands/release.py |
Adds draft handling and refactors PR creation. |
docs/commands/release.md |
Documents draft options. |
docs/CLI_REFERENCE.md |
Updates CLI reference documentation. |
docs/agent/tasks/task-116-secret-sanitizer-word-boundaries.md |
Records task objectives and status. |
docs/agent/task.md |
Updates the task index. |
Review details
Suppressed comments (3)
docs/agent/task.md:64
- The index repeats this task as
In ProgresswithPRset toTBD, even though this pull request is already open. Per the repository lifecycle, an opened PR must be represented asIn Reviewand linked from the index; otherwise project/task synchronization reports the wrong state.
| [#116](https://github.com/dan-petty/devops-cli/issues/116) | TBD | Secret sanitizer regex word boundary hardening and artifact name guard | `In Progress` | [`task-116-secret-sanitizer-word-boundaries.md`](tasks/task-116-secret-sanitizer-word-boundaries.md) |
src/devops_cli/commands/release.py:598
- The added tests only inspect dry-run JSON. The real behavior is in
_build_release_pr_command, but no assertion checks that the default invocation passes--draftor that--no-draftomits it, so a regression in the actualgh pr createarguments would still pass. Add command-level assertions for both paths around the mocked subprocess call.
if draft:
pr_cmd.append("--draft")
src/devops_cli/security/sanitizer.py:33
- This quantifier now permits only 19 characters after
sk-({18,}plus the mandatory final alphanumeric), while the issue specifies{20,}and the previous pattern required at least 20. Preserve the stated minimum so shorter identifiers are not newly classified as OpenAI credentials (for example, use{19,}before the final alphanumeric).
r"(?<![a-zA-Z0-9/\\<])(?<!task-)(?<!subtask-)sk-[A-Za-z0-9_-]{18,}[A-Za-z0-9]\b"
- Files reviewed: 8/9 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…and update task status (#116)
dan-petty
added a commit
that referenced
this pull request
Sep 16, 2026
* feat(release): v0.2.18 * fix(security): harden secret sanitizer boundaries and safe path exclusions (#116) (#203) * fix(security): harden secret sanitizer boundaries and safe path exclusions (#116) * fix(release): default release PRs to draft mode * fix(security): harden secret boundaries, remove extension lookahead, and update task status (#116) * fix(security): remediate devsecops findings and add native rate management (#204) * test * fix(security): remediate devsecops findings and add native rate management * docs(task): update task-204 status to in review and link PR #204 * fix(security): permit token masking in filesystem path arguments * fix(security): remediate review findings, exclude home in sandbox, and relocate MockProvider (#205) (#206) * fix(security): remediate review findings, exclude home in sandbox, and relocate MockProvider (#205) * docs(task): update task-205 status to in review and link PR #206 * test(sandbox): provide explicit tmp_path workspace_dir in test_docker_sandbox_wait_timeout * fix(rag): support both gitignore and gitwildmatch pathspec factories * feat(sandbox): multi-tier networking options and decommission task.md (#207) (#208) * feat(sandbox): multi-tier networking options and decommission task.md index (#207) * docs(agent): transition task 207 to in-review with PR #208 * test(projects): update test fixtures to eliminate task.md references * fix(security): replace concrete RFC 1918 and internal homelab endpoints with standard documentation values * fix(sandbox): harden network containment, secret output masking, and rate limiter caching * fix(sandbox): remediate egress containment, dns resolution, and output masking findings (#207) * fix(security): stream sandbox container output directly to sys streams avoiding logger sink cleartext alerts (#207) * docs(agents): mandate working pull requests from oldest to newest (FIFO) * docs(roadmap): add v0.2.23 reactive workstation command center and interactive TUI * docs(agents): mandate root-cause remediation, roadmap synthesis, and interaction improvement * fix(docs): escape placeholder angle brackets and prune completed roadmap matrix items * fix(security): stream sandbox output via centralized output writers to resolve codeql cleartext alerts * fix(k8s): uncap ollama memory limits and elevate daemonset/deployment thresholds (#209) (#210) * fix(k8s): uncap ollama memory limits and elevate daemonset/deployment thresholds (#209) * fix(k8s): add CoreDNS resource configs and tighten test assertions (#209) * fix(github): enforce gh request throttling, disk quota persistence, and diff-only project sync (#211) (#212) * fix(github): enforce window-budgeted rate pacing, disk quota persistence, and diff-only project sync (#211) * docs(agent): record PR #212 in task 211 tracking * fix(github): enforce low-quota circuit breakers, preamble-tolerant JSON parsing, and casing-safe project diffing (#211) * fix(github): replace quota thresholds with logical exponential backoff (#211) * test(github): patch run_gh instead of run_subprocess in reconcile tests (#211) * fix(github): derive rate limit pacing from actual response values without hardcoded windows (#211) * fix(ci): stop running all of the ci tasks every time a pr is marked ready for review. * fix(ci): decouple project automation into dedicated workflow and add quota safety guards (#211) * fix(github): align rate limiter baseline velocity and add quota test coverage (#211) * refactor(ai): eliminate inline function parameter defaults in favor of defaults submodule * fix(github): enforce strict non-negative rate quotas, 25% threshold, and remediate review findings (#211) * fix(typecheck): resolve Path None guard and optional quota remaining in mypy (#211) * docs: refresh CLI and MCP references for updated commands and errors (#211) * fix(ci): enforce mandatory pre-push devops ci gate, handle unauthenticated acquire, and expand test coverage (#211) * fix(pr): align checks fallback to run_subprocess and isolate rate limiter sleep test (#211) * fix(ci): complete pre-push gate, argo drift tests, and coverage expansion (#211) * docs(agent): update task-211 documentation with linear window pacing and pre-push quality gate (#211) * fix(pr): guard pr ready against failing checks and fix project automation uv sync (#211) * docs(pr): update cli and mcp reference for pr ready --force * fix(github): address pr 212 review comments on workflows, sandbox, defaults, and rate limiter (#211) * fix(security): derive artifact version from package metadata and validate whitelist tokens (#211) * feat(security): sigstore cosign container provenance and image signing (#112) (#213) * fix(ci): prune all merged PR devcontainer images from ghcr and guard in-flight builds * feat(security): sigstore cosign container provenance and image signing (#112) * docs(agent): link PR 213 in task 112 tracking doc * fix(security): resolve review comments for cosign container provenance (#112) * ci: re-trigger validation after resolving all review threads * feat(security): falco ebpf runtime security and anomaly streamer (#113) (#214) * feat(security): falco ebpf runtime security and anomaly streamer (#113) * fix(security): resolve review comments for falco ebpf runtime security (#113) * chore: retrigger validation after resolving all review threads * feat(security): distributed threat intelligence valkey l2 cache and radar batching (#122) (#215) * feat(security): distributed threat intelligence valkey l2 cache and radar batching (#122) * fix(security): resolve review comments for threat intel valkey l2 cache and batching (#122) * chore: retrigger validation after resolving all review threads * perf(github): adjust rate limit no-delay used threshold to 30%
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
task-*.md) and paths while preserving underscore-prefixed tokens (my_key_sk-...)..md,.py,.json,.yaml,.yml,.sh,.toml,.txt) from false-positive secret masking.devops release prepare --create-pranddevops release prto draft mode (--draft/--no-draft), ensuring release PRs are not prematurely opened as ready for review.ghCLI Usage: Decomposedrelease_printo single-responsibility helpers strictly adhering to cyclomatic complexitygh pr create.Closes #116.