Repository navigation
t18697: aidevops secret dependents: show what uses a credential before rename, rotation or revocation - #34733
Conversation
… threshold (GH#34717)
…dules under qlty file-complexity (GH#34717)
…jection (GH#34718)
…ory-multi-account-provi' into feature/gh34718-credential-aliases-defaults-injection # Conflicts: # .agents/scripts/credential_inventory.py
…es-defaults-injection' into feature/gh34719-credential-dependents
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one): 1🚫 Excluded labels (none allowed): 1
Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 124 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Qlty New-File Smell Gate✅ Clean — 2 new source file(s) scanned, no smells found.
New files scanned
|
Qlty Smell Regression Gate✅ No change — smell count unchanged.
|
…ory-multi-account-provi' into feature/gh34718-credential-aliases-defaults-injection # Conflicts: # .agents/scripts/credential_inventory.py
…es-defaults-injection' into feature/gh34719-credential-dependents
…ntial-dependents # Conflicts: # .agents/scripts/credential_inventory.py # .agents/scripts/credential_inventory_names.py # .agents/scripts/secret-helper.sh # .agents/tools/credentials/credential-inventory.md # TODO.md
Markdown Lint (changed-line scoped)No new violations in changed lines (0 pre-existing in touched files — ignored).
|
Shell Function Complexity Regression Gate✅ No regression — no new function(s) >100 lines.
|
Bash 3.2 Compatibility Regression Gate✅ No regression — no new bash 3.2-incompatible construct(s).
|
| except Exception: # noqa: BLE001 - malformed plist falls back to raw text | ||
| pass |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report SonarCloud: 0 bugs, 0 vulnerabilities, 1 code smells Thu Oct 15 01:20:40 UTC 2026: Code review monitoring started 📈 Current Quality Metrics
Generated on: Thu Oct 15 01:22:49 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
Shell Nesting Depth Regression Gate✅ No regression — no new file(s) with nesting depth >8.
|
File Size Regression Gate✅ No regression — no new non-README Markdown file(s) >1000 lines at root / >500 elsewhere.
|
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report SonarCloud: 0 bugs, 0 vulnerabilities, 1 code smells Thu Oct 15 01:32:19 UTC 2026: Code review monitoring started 📈 Current Quality Metrics
Generated on: Thu Oct 15 01:34:42 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
Planning-Publication-ID: cffea7ba4242bd0c1ad21efc838b70488db72008 Planning-Publication-Handoff-ID: 850a821abc7577bbb0648a754dd6e21a19e137bd
Planning-Publication-ID: cffea7ba4242bd0c1ad21efc838b70488db72008 Planning-Publication-Handoff-ID: 850a821abc7577bbb0648a754dd6e21a19e137bd Co-authored-by: GitHub Actions <actions@github.com>
Summary
Resolves #34719. For #34680.
Stacked on #34732 (t18696), which is stacked on #34726 (t18695). Base is the #34732 branch, so this diff shows only the dependents work.
Adds
aidevops secret dependents NAME [--json]: a local, read-only answer to "what uses this credential?" before a rename, rotation or revocation. It searches the name and its declared aliases (and works when given an alias).~/.config/aidevops/repos.jsonand all its linked worktreesgit grep -F --untracked(honours.gitignore), 30 s timeout per worktree, parallel~/.aidevops/agents/custom/~/.config/aidevops/*.json|conf|toml|yaml(e.g.site-inventory.jsoncredential_env)~/Library/LaunchAgents/*.plist(binary plists decoded),~/.config/systemd/user/*,crontab -lSafety properties:
path:lineand the matched name). Line text is used for classification and never returned, so values in scanned files cannot leak."CLOUDFLARE_${ACCOUNT}_API_TOKEN", concatenation, f-strings,%s/.format) are reported aspossible-dynamicand setcomplete: false. Timeouts, truncation and unreadable files do the same. "No references found" is printed only for a complete, empty result.CLOUDFLARE_API_TOKENdoes not matchCLOUDFLARE_ACME_API_TOKEN.Files
.agents/scripts/credential_inventory_scan.py(new): needle building, literal/dynamic classification, boundedgit grep/file scanning; one subprocess site with an absolute executable (# nosec B603)..agents/scripts/credential_inventory_dependents.py(new): source discovery (repos/worktrees, custom agents, configs, schedulers, crontab), report and text rendering..agents/scripts/credential_inventory_names.py:related_names(canonical first, then aliases)..agents/scripts/credential_inventory.py:dependentssubcommand..agents/scripts/secret-helper.sh: dispatch and help line..agents/tools/credentials/credential-inventory.md: Quick Reference rule ("run dependents before renaming/rotating/revoking; only trustcomplete: true") and a "Dependents" section.Verification
Isolated-
HOMEruntime script: two git repos (one with a linked worktree), custom agent,site-inventory.json, a binary LaunchAgent plist, and a canonical name plus an alias:CLOUDFLARE_${ACCOUNT}_API_TOKENandf"CLOUDFLARE_{acct}_API_TOKEN"were reported aspossible-dynamic, givingcomplete: falseand an INCOMPLETE warning.complete: truewith 7 literal hits.py_compileand markdownlint are clean.Regression Evidence
This is not a platform fix.
systemd,cronand LaunchAgent are mentioned only as read-only scan locations for a new command, and no platform-specific behaviour changes. No repository test was added: under the repo's test policy (reference/ci-gate-policy.md), the new feature was verified through the product path with an isolated-HOMEruntime fixture (see Verification). That fixture covered a binary plist, linked worktrees, ignored and untracked files, dynamic name construction, and no value leakage. Existingtest-secret-helper.shpasses 26/26.aidevops.sh v3.39.31 plugin for OpenCode v1.19.0 with claude-opus-5-5 spent 54m and 274,339 tokens on this with the user in an interactive session.