Skip to content

fix(agent-scan): register 4 new detection skills in _DETECTION_SKILLS#452

Merged
boy-hack merged 1 commit into
mainfrom
fix/register-agent-scan-skills
Jul 15, 2026
Merged

fix(agent-scan): register 4 new detection skills in _DETECTION_SKILLS#452
boy-hack merged 1 commit into
mainfrom
fix/register-agent-scan-skills

Conversation

@boy-hack

@boy-hack boy-hack commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Four detection skills added in PR #444 were never registered in _DETECTION_SKILLS in agent-scan/core/agent.py, so they were silently never executed during agent scans.

Root Cause

PR #444 added 4 new skill files under agent-scan/prompt/skills/ but did not update the _DETECTION_SKILLS list in agent.py. This list controls which skills are actually spawned as workers during Stage 2 of an agent scan.

Fix

Added the 4 missing skills to _DETECTION_SKILLS:

_DETECTION_SKILLS: List[str] = [
    "data-leakage-detection",
    "tool-abuse-detection",
    "indirect-injection-detection",
    "authorization-bypass-detection",
    # Newly registered (were present but not executed):
    "direct-injection-detection",
    "file-path-traversal-detection",
    "hardcoded-secret-detection",
    "memory-poisoning-detection",
]

Impact

After this fix, agent scans will detect:

  • Direct Prompt Injection (direct-injection-detection) — ASI01
  • File Path Traversal (file-path-traversal-detection) — ASI05
  • Hardcoded Secrets (hardcoded-secret-detection) — ASI06
  • Memory Poisoning (memory-poisoning-detection) — ASI06

These are critical security detection capabilities that were previously available but silently skipped.

Reference: PR #429 (by @DevamShah) correctly demonstrated the pattern — both SKILL.md + agent.py registration in the same PR.

Skills added in PR #444 (direct-injection-detection,
file-path-traversal-detection, hardcoded-secret-detection,
memory-poisoning-detection) were missing from the _DETECTION_SKILLS
list in agent.py and therefore never executed during agent scans.

Fixes: PR #444 follow-up
@boy-hack
boy-hack merged commit 9c2c0f8 into main Jul 15, 2026
5 checks passed
huangyingting pushed a commit to repomesh/AI-Infra-Guard that referenced this pull request Jul 16, 2026
PR Tencent#452 registered 4 detection skills (originally added in PR Tencent#444 but
missing from _DETECTION_SKILLS in agent.py) into the active scan pipeline.
Update docs to reflect the complete set of detection capabilities:

- agent-scan_openSource.md: Add direct-injection, file-path-traversal,
  hardcoded-secret, and memory-poisoning detection to detection dimensions
- agent-scan_openSource_en.md: Same additions in English version

New detection categories added:
- Data Security: hardcoded-secret-detection
- Injection Attacks: direct-injection-detection
- Tool Abuse: file-path-traversal-detection
- Memory Security: memory-poisoning-detection (new category)
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