agentic-actions-audito…
Audit GitHub Actions that run AI agents for prompt injection, unsafe interpolation, sandbox gaps, and permissive actor rules. Use…
Creates language variants of existing Semgrep rules. Use when porting a Semgrep rule to specified target languages. Takes an existing rule and target languages as input, produces independent rule+test directories for each language.
Claude Code
$ npx -y skills add waybarrios/opencode-power-pack --skill semgrep-rule-variant-creator --agent claude-code
Codex
$ npx skills add waybarrios/opencode-power-pack --skill semgrep-rule-variant-creator -a codex -y
Cursor
$ npx skills add waybarrios/opencode-power-pack --skill semgrep-rule-variant-creator -a cursor -y
Gemini CLI
$ npx skills add waybarrios/opencode-power-pack --skill semgrep-rule-variant-creator -a gemini-cli -y
GitHub Copilot
$ npx skills add waybarrios/opencode-power-pack --skill semgrep-rule-variant-creator -a github-copilot -y
OpenCode
$ npx skills add waybarrios/opencode-power-pack --skill semgrep-rule-variant-creator -a opencode -y
Windsurf
$ npx skills add waybarrios/opencode-power-pack --skill semgrep-rule-variant-creator -a windsurf -y
name: semgrep-rule-variant-creator description: "Creates language variants of existing Semgrep rules. Use when porting a Semgrep rule to specified target languages. Takes an existing rule and target languages as input, produces independent rule+test directories for each language." license: MIT (modified; see UPSTREAMS.json)
Port existing Semgrep rules to new target languages with proper applicability analysis and test-driven validation.
**Ideal scenarios:**
Do NOT use this skill for:
This skill requires: 1. **Existing Semgrep rule** - YAML file path or YAML rule content 2. **Target languages** - One or more languages to port to (e.g., "Golang and Java")
For each applicable target language, produces:
<original-rule-id>-<language>/ ├── <original-rule-id>-<language>.yaml # Ported Semgrep rule └── <original-rule-id>-<language>.<ext> # Test file with annotations
Example output for porting `sql-injection` to Go and Java:
sql-injection-golang/ ├── sql-injection-golang.yaml └── sql-injection-golang.go sql-injection-java/ ├── sql-injection-java.yaml └── sql-injection-java.java
When porting Semgrep rules, reject these common shortcuts:
| Rationalization | Why It Fails | Correct Approach | |-----------------|--------------|------------------| | "Pattern structure is identical" | Different ASTs across languages | Always dump AST for target language | | "Same vulnerability, same detection" | Data flow differs between languages | Analyze target language idioms | | "Rule doesn't need tests since original worked" | Language edge cases differ | Write NEW test cases for target | | "Skip applicability - it obviously applies" | Some patterns are language-specific | Complete applicability analysis first | | "I'll create all variants then test" | Errors compound, hard to debug | Complete full cycle per language | | "Library equivalent is close enough" | Surface similarity hides differences | Verify API semantics match | | "Just translate the syntax 1:1" | Languages have different idioms | Research target language patterns |
This workflow is **strict** - do not skip steps:
This skill guides the creation of language-specific variants of existing Semgrep rules. Each target language goes through an independent 4-phase cycle:
FOR EACH target language: Phase 1: Applicability Analysis → Verdict Phase 2: Test Creation (Test-First) Phase 3: Rule Creation Phase 4: Validation (Complete full cycle before moving to next language)
**The `semgrep-rule-creator` skill is the authoritative reference for Semgrep rule creation fundamentals.** While this skill focuses on porting existing rules to new languages, the core principles of writing quality rules remain the same.
Consult `semgrep-rule-creator` for guidance on:
When porting a rule, you're applying these same principles in a new language context. If uncertain about rule structure or approach, refer to `semgrep-rule-creator` first.
Before porting, determine if the pattern applies to the target language.
**Analysis criteria:** 1. Does the vulnerability class exist in the target language? 2. Does an equivalent construct exist (function, pattern, library)? 3. Are the semantics similar enough for meaningful detection?
**Verdict options:**
See [applicability-analysis.md](references/applicability-analysis.md) for detailed guidance.
**Always write tests before the rule.**
Create test file with target language idioms:
// ruleid: sql-injection-golang
db.Query("SELECT * FROM users WHERE id = " + userInput)
// ok: sql-injection-golang
db.Query("SELECT * FROM users WHERE id = ?", userInput)1. **Analyze AST**: `semgrep --dump-ast -l <lang> test-file` 2. **Translate patterns** to target language syntax 3. **Update metadata**: language key, message, rule ID 4. **Adapt for idioms**: Handle language-specific constructs
See [language-syntax-guide.md](references/language-syntax-guide.md) for translation guidance.
# Validate YAML semgrep --validate --config rule.yaml # Run tests semgrep --test --config rule.yaml test-file
**Checkpoint**: Outpu
55 rigorous skills for Claude Code, Codex, OpenCode 1 and 2, and Pi: code review, security audit, feature development, frontend design, MCP tools, Hugging Face ML/training, and more.
Audit GitHub Actions that run AI agents for prompt injection, unsafe interpolation, sandbox gaps, and permissive actor rules. Use…
Audit and improve project-rules files (AGENTS.md, CLAUDE.md, .agents/instructions, local overrides) so the agent keeps accurate…
Capture learnings from the current session into the project-rules file (AGENTS.md, CLAUDE.md, or local override) so future…
Operational rubric that turns "don't make AI slop" into observable properties, severity levels, evidence requirements, and repair…
Design a feature architecture by analyzing existing codebase patterns and conventions, then provide a comprehensive…
Deeply analyze an existing codebase feature by tracing execution paths, mapping architecture layers, understanding patterns and…
Use for authorized security assessment of REST, GraphQL, WebSocket, or SOAP APIs, including discovery, authentication,…
Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys)…
Clean and finalize authorized natural-language text intended for readers by auditing suspicious invisible Unicode and rewriting…