Skip to content

Added audit skill for security and further penetration testing purpose.#1

Open
kanatat-asp wants to merge 1 commit into
kentwynn:mainfrom
kanatat-asp:feature/audit-skill
Open

Added audit skill for security and further penetration testing purpose.#1
kanatat-asp wants to merge 1 commit into
kentwynn:mainfrom
kanatat-asp:feature/audit-skill

Conversation

@kanatat-asp
Copy link
Copy Markdown

@kanatat-asp kanatat-asp commented May 10, 2026

Summary
Adds a new kgraph audit command that scans existing repo maps and surfaces security-sensitive files and symbols grouped by category.
Introduces 6 built-in audit categories: Authentication & Authorization, Input Handling, Cryptography, Data Access, External Connections, and Dangerous Patterns.
Supports --json flag for machine-readable output, consistent with impact and context commands.

New files:
src/context/audit.ts — pure analysis function, scans file paths and symbol names against 6 security categories
src/cli/commands/audit.ts — command registration + markdown renderer

Modified files:
src/cli/index.ts — imports and registers registerAuditCommand
src/cli/help.ts — adds audit to the Workflows section

Usage:
kgraph audit # markdown output
kgraph audit --json # machine-readable

Test plan

  • kgraph scan on a repo with auth/crypto/route code, then kgraph audit — verify findings appear per category
  • kgraph audit --json — verify valid JSON output with categories, totalFlaggedFiles, totalFlaggedSymbols
  • Repo with no matching symbols — verify "No security-sensitive patterns found" message
  • kgraph --help — verify audit appears under Workflows section

@kentwynn
Copy link
Copy Markdown
Owner

Please add unit test and resolved conflict

@kentwynn
Copy link
Copy Markdown
Owner

Instead of introduce new cli command, please check current command as kgraph impact...

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.

2 participants