本文へ移動
cccskills
無料GitHub で公開

sast

Static analysis tool runner. Wraps ESLint, Semgrep, Bandit, Clippy, and language-specific analyzers with unified severity output. Use when deeper code analysis needed beyond pattern matching.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md6.6 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

sast

Purpose

Unified static analysis tool runner. While sentinel does regex-based security pattern matching and verification runs lint/type/test/build, SAST goes deeper — running dedicated static analysis tools that understand data flow, taint tracking, and language-specific vulnerability patterns.

Sentinel catches obvious patterns (hardcoded secrets, SQL string concat). SAST catches subtle ones (tainted data flowing through 3 function calls to a sink, unsafe deserialization behind a wrapper).

Triggers

  • Called by sentinel (L2) when deep analysis needed beyond pattern matching
  • Called by audit (L2) during security dimension assessment
  • Called by cook (L1) on security-sensitive code (auth, crypto, payments)
  • /rune sast — manual static analysis scan

Calls (outbound)

None — pure runner using Bash for all tools.

Called By (inbound)

  • sentinel (L2): deep analysis beyond regex patterns
  • audit (L2): security dimension in full audit
  • cook (L1): security-sensitive code paths
  • review (L2): when security patterns detected in diff

Execution

Step 1 — Detect Language and Tools

Use Glob to detect project language and available tools:

IndicatorLanguagePrimary ToolFallback
package.jsonJavaScript/TypeScriptnpx eslint --ext .js,.ts,.tsxnpx oxlint
tsconfig.jsonTypeScriptnpx tsc --noEmit + ESLint—
pyproject.toml / setup.pyPythonbandit -r . -f jsonruff check --select S .
Cargo.tomlRustcargo clippy -- -D warningscargo audit
go.modGogovulncheck ./...go vet ./...
.semgrep.yml / anyAnysemgrep --config auto—

Check tool availability:

Bash: command -v <tool> 2>/dev/null
→ If not installed: mark as SKIP with install instruction
→ If installed: proceed with scan

Step 2 — Run Primary Analysis

Run the detected primary tool on changed files (or full project if no diff):

For each available tool:
  Bash: <tool command> 2>&1
  → Capture stdout + stderr
  → Parse output into unified format (see Step 4)
  → Record: exit code, finding count, execution time

Tool-specific commands:

# ESLint (JS/TS) — security-focused rules
npx eslint --no-eslintrc --rule '{"no-eval": "error", "no-implied-eval": "error"}' <files>

# Bandit (Python) — security scanner
bandit -r <path> -f json -ll  # medium+ severity only

# Semgrep (any language) — pattern-based analysis
semgrep --config auto --json --severity ERROR --severity WARNING <path>

# Clippy (Rust) — lint + security
cargo clippy --all-targets -- -D warnings -W clippy::unwrap_used

# govulncheck (Go) — vulnerability check
govulncheck ./...

Step 3 — Run Semgrep (If Available)

Semgrep provides cross-language analysis with community rules. Run regardless of primary language tool:

IF semgrep is installed:
  Bash: semgrep --config auto --json <changed-files-or-project>
  → Parse JSON output
  → Map severity: error→BLOCK, warning→WARN, info→INFO

If semgrep is NOT installed, log INFO: "semgrep not installed — install with pip install semgrep for deeper cross-language analysis."

Step 4 — Normalize to Unified Format

Map all tool outputs to unified severity:

BLOCK (must fix):
  - Bandit: HIGH confidence + HIGH severity
  - ESLint: error-level security rules
  - Semgrep: ERROR severity
  - Clippy: deny-level warnings
  - govulncheck: any known vulnerability

WARN (should fix):
  - Bandit: MEDIUM confidence or MEDIUM severity
  - ESLint: warning-level rules
  - Semgrep: WARNING severity
  - Clippy: warn-level suggestions

INFO (informational):
  - Bandit: LOW severity
  - Semgrep: INFO severity
  - Style/convention suggestions

Step 5 — Report

## SAST Report
- **Status**: PASS | WARN | BLOCK
- **Tools Run**: [list with versions]
- **Tools Skipped**: [list with install instructions]
- **Files Scanned**: [count]
- **Findings**: [count by severity]

### BLOCK (must fix)
- `path/to/file.py:42` — [tool] Possible SQL injection via string formatting (B608)
- `path/to/auth.ts:15` — [semgrep] JWT token not verified before use

### WARN (should fix)
- `path/to/utils.py:88` — [bandit] Use of `subprocess` with shell=True (B602)

### INFO
- `path/to/config.ts:10` — [eslint] Prefer `const` over `let` for unchanging variable

### Tool Coverage
| Tool | Status | Findings | Duration |
|------|--------|----------|----------|
| ESLint | RAN | 2 WARN | 1.2s |
| Semgrep | SKIPPED | — | — (not installed) |
| Bandit | N/A | — | — (not Python) |

Output Format

SAST Report with status (PASS/WARN/BLOCK), tools run, files scanned, findings by severity (BLOCK/WARN/INFO), and tool coverage table. See Step 5 Report above for full template.

Constraints

  1. MUST run all available tools for the detected language — not just one
  2. MUST attempt Semgrep regardless of primary language (if installed)
  3. MUST normalize all outputs to unified BLOCK/WARN/INFO — don't dump raw tool output
  4. MUST show install instructions for missing tools — not silently skip
  5. MUST report which tools ran and which were skipped — transparency
  6. MUST NOT block on missing tools — SKIP with instruction, not FAIL

Sharp Edges

Failure ModeSeverityMitigation
Tool not installed → entire scan skipped silentlyHIGHConstraint 4: show install instruction, continue with available tools
Raw tool output dumped without normalizationMEDIUMStep 4: always normalize to unified format
Only running one tool when multiple applyMEDIUMConstraint 1: run ALL available tools for the language
Semgrep community rules producing noiseLOWFilter to ERROR+WARNING severity only — skip INFO-level Semgrep
Long-running scan on large codebaseMEDIUMRun on changed files only when diff available, full scan only on manual invocation

Done When

  • Language detected from project config files
  • All available tools executed (or SKIP with install instruction)
  • Findings normalized to unified BLOCK/WARN/INFO format
  • Tool coverage table showing what ran and what was skipped
  • SAST Report emitted with overall verdict

Cost Profile

~300-800 tokens input, ~200-500 tokens output. Haiku + Bash commands. Tool execution time varies (1-30s depending on project size).

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

adversary

無料

Pre-implementation red-team analysis. Use when a plan is high-risk, critical path, or expensive to reverse. Challenges plans before code is written — finds edge cases, security holes, scalability bottlenecks, error propagation risks, and integration conflicts. Catches flaws at plan time (10x cheaper than post-implementation).

日本語の概要は準備中です。原文の説明を表示しています。

Rune-kit/rune862026年8月16日 更新

Creates code-based visual assets — SVG icons, OG image HTML templates, social banners, and icon sets. Use when generating visuals as code (vector/HTML), NOT raster images — for raster generation see @rune-pro/media. Outputs files with usage instructions.

日本語の概要は準備中です。原文の説明を表示しています。

Rune-kit/rune862026年8月16日 更新

audit

無料

Comprehensive project audit — security, dependencies, code quality, architecture, performance, infra, docs, and mesh analytics. Use when needing a full 8-dimension health-score snapshot before a major release, M&A diligence, or quarterly review. Delegates to specialist skills (sentinel, dependency-doctor, perf, autopsy, etc.).

日本語の概要は準備中です。原文の説明を表示しています。

Rune-kit/rune862026年8月16日 更新

autopsy

無料

Full codebase health assessment. Use when diagnosing project health or starting a rescue workflow on legacy code — OR when evaluating an external GitHub repo for dependency / fork / contribution decisions (--external mode). Analyzes complexity, dependencies, dead code, tech debt, and git hotspots. Produces a health score and rescue plan.

日本語の概要は準備中です。原文の説明を表示しています。

Rune-kit/rune862026年8月16日 更新

ba

無料

Business Analyst agent. Use when starting a new feature requiring requirements elicitation BEFORE plan or cook. Asks probing questions, identifies hidden requirements, maps stakeholders, defines scope boundaries, and produces a structured Requirements Document that plan and cook consume.

日本語の概要は準備中です。原文の説明を表示しています。

Rune-kit/rune862026年8月16日 更新

Creative ideation and solution exploration. Generates multiple approaches with trade-offs, uses structured frameworks (SCAMPER, First Principles), and hands off to plan for structuring.

日本語の概要は準備中です。原文の説明を表示しています。

Rune-kit/rune862026年8月16日 更新

Rune-kit のスキルをすべて見る

このスキルの問題を報告する