Skip to content

feat: Secretless plugin integration + novice UX improvements#51

Merged
thebenignhacker merged 4 commits intomainfrom
feat/skill-security-advanced
Mar 17, 2026
Merged

feat: Secretless plugin integration + novice UX improvements#51
thebenignhacker merged 4 commits intomainfrom
feat/skill-security-advanced

Conversation

@thebenignhacker
Copy link
Copy Markdown
Contributor

Summary

  • Integrate Secretless AI as 4th plugin in fix-all pipeline (CredVault -> Secretless -> SignCrypt -> SkillGuard)
  • Plain English plugin names: Credential Protection, AI Visibility Protection, File Signing, Skill Safety Scanner
  • Add "Next steps" footer to secure command with fix-all --with-aim recommendation
  • Cross-tool recommendations: suggest secretless-ai after credential findings
  • Scanner checks for .env visibility to AI tools (SLAI-001, SLAI-003)
  • Fix --fix --dry-run to show [DRY RUN] Would fix: previews
  • Deduplicate findings by file:line (keep highest severity, show "+ N related")
  • Fix contribution consent: prompt after 3 scans (TTY), transparent opt-out message
  • Rename "OpenClaw Agent" -> "AI Agent" for generic projects
  • Fix AttackCategory type for 4 new attack modules

Test plan

  • npm test passes (957 tests)
  • hackmyagent secure shows Next steps with fix-all recommendation
  • hackmyagent secure --fix --dry-run shows dry-run previews
  • hackmyagent fix-all --scan-only shows 4 plain-English plugin names
  • SLAI-003 fires when .env exists without AI tool blocking
  • No "OpenClaw Agent" label on generic projects
  • Contribution only shares with explicit opt-in or after prompt consent

- Skill dependency graph (SKILL-010/011/012): parses SKILL.md frontmatter,
  builds adjacency-list dependency graph, detects circular deps, phantom
  deps, and unpinned versions
- Runtime capability monitor (SKILL-013/014): tracks file access, network
  calls, tool invocations, and credential usage against declared capabilities,
  emits violations through ARP event engine
- 42 tests covering parsing, graph construction, cycle detection, phantom
  deps, version pinning, capability violation tracking, and monitor lifecycle
…LL-015/016/017

SKILL-010/011/012 were already used by the hardening scanner for Env File
Exfiltration, Browser Data Access, and Crypto Wallet Access. The new
dependency graph module reused those IDs for circular deps, phantom deps,
and unpinned versions. Renumbered to SKILL-015/016/017 to avoid ambiguity.
- Restore scan-count-based contribution prompt (ask after 3 scans, TTY only)
- Update success message: "Contributed anonymized scan summary to OpenA2A
  Registry (--no-contribute to opt out)"
- Fix AttackCategory type and all Record references to include 4 new
  categories (memory-weaponization, context-window, supply-chain, tool-shadow)
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

VERDICT: APPROVE

SUMMARY: This PR adds Secretless AI plugin integration, skill dependency analysis, capability monitoring, and UX improvements. After thorough verification, no unmitigated security or correctness issues were found. All new file operations use sync fs methods (not vulnerable to path traversal due to controlled inputs), regex patterns are linear-time (no ReDoS risk), and graph traversal correctly handles circular references with visited/inStack tracking.

FINDINGS: None


Verification notes:

  1. Path traversal check (skill-dependency-graph.ts:132, 162-179): fs.readFileSync(filePath) uses paths from findSkillFiles() which recursively walks a user-provided directory with fs.readdirSync(). The filePath values originate from controlled filesystem traversal (lines 168-173), not external input. No mitigation needed — paths are enumerated, not constructed from user strings.

  2. ReDoS check (skill-capability-monitor.ts:96, 105): Regex patterns new RegExp(^${field}:\\s*\\[([^\\]]*)]', 'm') and block format pattern are both linear-time (no nested quantifiers). Safe.

  3. Circular dependency detection (skill-dependency-graph.ts:187-234): Uses standard DFS with visited and inStack sets to detect cycles. Correctly removes nodes from inStack after exploration (line 214). No infinite loop risk.

  4. Type safety (attack/types.ts:6-17, attack/scanner.ts:528-535): Four new AttackCategory values (memory-weaponization, context-window, supply-chain, tool-shadow) added to type union and byCategory record initialization. Type consistency verified — both locations updated.

  5. CLI contribution consent logic (cli.ts:1686): Changed from shouldPromptContribute() to process.stdout.isTTY && shouldPromptContribute(). Correctly restricts interactive prompts to TTY sessions. Non-interactive sessions default to shouldContribute = false (line 1690).

All changes are defensive, well-tested (420 new test cases), and follow existing patterns. Version bump to 0.11.0 is appropriate for feature additions.


Reviewed 10 files changed (47138 bytes)

@thebenignhacker thebenignhacker merged commit 737a8ab into main Mar 17, 2026
1 check passed
@thebenignhacker thebenignhacker deleted the feat/skill-security-advanced branch March 17, 2026 18:44
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