Skip to content

feat: add skill-security-auditor as default example skill#1479

Open
statxc wants to merge 3 commits intoeigent-ai:mainfrom
statxc:feat/add-skill-security-auditor-example
Open

feat: add skill-security-auditor as default example skill#1479
statxc wants to merge 3 commits intoeigent-ai:mainfrom
statxc:feat/add-skill-security-auditor-example

Conversation

@statxc
Copy link
Contributor

@statxc statxc commented Mar 10, 2026

Related Issue

Closes #1462

Description

Add skill-security-auditor as a default example skill that ships with Eigent. This gives all agents built-in security awareness for code auditing, secrets detection, and vulnerability scanning.

What's included:

  • SKILL.md - Core audit guide with a 6-step workflow: reconnaissance, secrets detection, OWASP Top 10 vulnerability scanning, dependency audit, configuration review, and auth/authorization review. Includes a standardized report format.
  • references/vulnerability-patterns.md - Detailed detection patterns for injection, auth, crypto, deserialization, SSRF, and file operation vulnerabilities across Python, JavaScript, TypeScript, Go, and Java. Includes framework-specific checks for Django, Flask, Express, and Spring Boot.
  • references/secrets-patterns.md - Regex patterns for 20+ secret types (AWS, GCP, Azure, GitHub, Slack, Stripe, SendGrid, etc.), database connection strings, and private keys. Includes false-positive reduction rules.
  • scripts/scan_project.py - Full project scanner that checks for hardcoded secrets, dangerous function calls (by language), and insecure configuration patterns. Supports text and JSON output.
  • scripts/scan_secrets.py - Focused secrets scanner with false-positive filtering (skips placeholders, env var references, test files by default). Supports --include-tests flag.

No code changes required - the existing skill system auto-discovers new example skills from resources/example-skills/ via seedDefaultSkillsIfEmpty() and skills-scan. No modifications to Electron, frontend, backend, or build config.

Testing Evidence (REQUIRED)

  • I have included human-verified testing evidence in this PR.
  • This PR includes frontend/UI changes, and I attached screenshot(s) or screen recording(s).
  • No frontend/UI changes in this PR.

Script verification:

$ python scripts/scan_project.py /path/to/project --format text
Scanned 6 files, found 24 issue(s)
  Critical: 9
  High: 10
  Medium: 5
  Low: 0

$ python scripts/scan_secrets.py /path/to/project --format text
Scanned 6 files, found 10 potential secret(s)

By type:
  RSA Private Key: 2
  Generic Private Key: 2
  ...

Both scripts run successfully with stdlib-only dependencies (no pip installs needed), produce correct output in both text and JSON formats, and return appropriate exit codes (0 for clean, 1 for findings).

Project Scan:

project_scan

Secretes Scan:

secrets_scan

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Contribution Guidelines Acknowledgement

@statxc
Copy link
Contributor Author

statxc commented Mar 10, 2026

@Wendong-Fan @bytecii Please review this PR.

@statxc
Copy link
Contributor Author

statxc commented Mar 13, 2026

@Wendong-Fan @fengju0213 @Pakchoioioi Please review my PR and give me any feedbacks

@statxc
Copy link
Contributor Author

statxc commented Mar 16, 2026

Please any updates for me

@4pmtong
Copy link
Collaborator

4pmtong commented Mar 16, 2026

Thanks @statxc for contribution! could @fengju0213 @Pakchoioioi help review it?

@4pmtong 4pmtong self-requested a review March 16, 2026 07:36
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hi @statxc The copyright line is still the template placeholder [yyyy] [name of copyright owner]. Could you fill this in?


def should_skip(path: Path) -> bool:
"""Return True if path should be skipped (e.g. .git, node_modules)."""
return any(part in SKIP_DIRS for part in path.parts)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hi @statxc Consider checking only the parts relative to the project root instead. Same issue exists in scan_secrets.py

Copy link
Collaborator

@fengju0213 fengju0213 left a comment

Choose a reason for hiding this comment

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

thanks @statxc left some comments


SKIP_DIRS = {
".git", "node_modules", "__pycache__", ".venv", "venv",
"env", ".env", "dist", "build", ".tox", ".mypy_cache",
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should also check env?

lines = content.splitlines()
for line_num, line in enumerate(lines, 1):
stripped = line.lstrip()
if stripped.startswith("#") or stripped.startswith("//"):
Copy link
Collaborator

Choose a reason for hiding this comment

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

This might cause miss commented keys.

@statxc statxc force-pushed the feat/add-skill-security-auditor-example branch from 30f2c89 to 7f90ec1 Compare March 16, 2026 19:00
@statxc
Copy link
Contributor Author

statxc commented Mar 16, 2026

@4pmtong @fengju0213 Thanks for your feedbacks. Good points! I have fixed. I'd appreciate you review again.

@statxc statxc requested review from 4pmtong and fengju0213 March 17, 2026 17:44
@statxc
Copy link
Contributor Author

statxc commented Mar 17, 2026

Please review again. what else should I update more?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Add skill-security-auditor as default example skill

3 participants