AGENT SKILL
suggest-fixes
Suggest concrete code fixes for SkillGuard security findings — generate remediation patches
- License 许可
- MIT
- 最近更新
- 2026-04-04
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- description
- Suggest concrete code fixes for SkillGuard security findings — generate remediation patches
- allowed-tools
- [ "Bash", "Read", "Glob", "Grep", "Edit", "Write" ]
03 SKILL.md 正文
Suggest Fixes for SkillGuard Findings
Reads SkillGuard scan findings and generates concrete code fixes. Can either suggest fixes or directly apply them with user approval.
Usage
-
Generate a JSON report:
npx skillguard <target> --json report.json -
Ask to fix the findings. Read the report and the source files to generate patches.
Fix Strategies by Dimension
Prompt Injection
- Remove injection phrases from prompts
- Use structured prompt templates instead of string concatenation
- Remove zero-width characters with text sanitization
Permission Escalation
- Remove
dangerouslyDisableSandbox— run in sandbox - Replace
sudowith user-level operations - Change
chmod 777tochmod 755or644 - Add
allowed-toolsto SKILL.md frontmatter
Data Exfiltration
- Isolate env var reads from network requests
- Add URL allowlists for outbound HTTP
- Remove direct .env file reading — use injected env vars
Destructive Operations
- Add path allowlist validation before
rm -rf - Replace
git push --forcewith--force-with-lease - Add confirmation prompts before destructive ops
Supply Chain
- Pin dependency versions:
package@1.2.3instead ofpackage - Replace
curl | bashwith download-then-review-then-execute - Add
@sha256:digests to Docker FROM statements
Code Security
- Replace
shell=Truewithshell=Falseand argument lists - Replace
eval()withJSON.parse()or safe alternatives - Use parameterized SQL queries instead of f-strings
Credential Leaks
- Move hardcoded secrets to environment variables
- Add
.envto.gitignore - Replace hardcoded API keys with
process.env.KEY_NAME
Least Privilege
- Add
allowed-toolsfrontmatter listing only needed tools - Split skills with shell+network+write into focused sub-skills
License Compliance
- Check dependency license compatibility
- Add license declarations to SKILL.md frontmatter
Resource Abuse
- Add
maxIterationsor timeout to loops - Set reasonable retry limits with exponential backoff
- Add recursion depth limits
Workflow
- Read the JSON report to identify findings
- Read each affected source file
- For each finding, propose a minimal, targeted fix
- Apply fixes with Edit tool (with user approval)
- Re-run
npx skillguard <target>to verify the fix reduced the risk score
04 同仓库更多 Skills
sample-skill
Test skill for SkillGuard
★ 1
explain-report
Explain a SkillGuard security audit report — analyze findings, assess real risk vs false positives, and provide context
★ 1
audit
Run SkillGuard security audit on AI agent skills — scans 10 dimensions with 109 rules based on OWASP LLM Top 10, SLSA, and Google SAIF
★ 1