Ensure accessibility in UI components including semantic HTML, ARIA attributes, keyboard navigation, and WCAG 2.2 AA compliance.
日本語の概要は準備中です。原文の説明を表示しています。
AI-powered code vulnerability analysis and dependency scanning using Gemini CLI security extension patterns. Detects hardcoded secrets, injection attacks, weak cryptography, authentication flaws, and LLM prompt injection. Also scans dependencies against the OSV.dev vulnerability database.
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
This skill adapts the Gemini CLI Security Extension's analysis methodology for the agent-studio framework. The original extension uses two MCP server patterns — a security analysis server and an OSV-Scanner integration — to provide dual-vector coverage. This skill implements equivalent analysis using native Claude Code tools (WebFetch for OSV.dev API, Grep/Bash for static analysis patterns).
Source repository: https://github.com/gemini-cli-extensions/security
License: Apache 2.0
Performance: 90% precision, 93% recall (OpenSSF CVE benchmark, TypeScript/JavaScript)
NO PRODUCTION CODE WITHOUT SECURITY ANALYSIS FOR AUTH/SECRETS/EXTERNAL-INPUT HANDLERS
All code paths handling authentication, hardcoded values, external input, or AI model outputs MUST be analyzed before production deployment.
| Pattern | Detection Method |
|---|---|
| Hardcoded API keys | Grep for key patterns + entropy analysis |
| Hardcoded passwords | Credential keyword detection |
| Private keys in source | PEM block / base64 key detection |
| Encryption keys | Symmetric key constant patterns |
| Attack Type | Examples |
|---|---|
| SQL injection | String concatenation in queries |
| XSS | Unescaped user content in HTML/JS output |
| Command injection | Shell exec with user-controlled args |
| SSRF | User-controlled URLs in server requests |
| Template injection | Unsanitized user input in template engines |
| Flaw | Detection |
|---|---|
| Session bypass | Missing auth middleware |
| Weak tokens | Predictable token generation |
| Insecure password reset | Token-less or email-only resets |
| Missing MFA enforcement | Auth flows without 2FA checks |
| Issue | Detection |
|---|---|
| Weak cryptography | MD5/SHA1 for secrets; DES/RC4 usage |
| Sensitive data in logs | PII/credential patterns in log statements |
| PII violations | Unencrypted PII storage or transmission |
| Insecure deserialization | Unsafe pickle/eval/deserialize calls |
| Risk | Detection |
|---|---|
| Prompt injection | User content injected into LLM prompts without sanitization |
| Unsafe output handling | LLM output used in exec/eval/shell without validation |
| Insecure tool integration | Tool calls with unchecked LLM-provided parameters |
// From an agent
Skill({ skill: 'gemini-cli-security' });
// With arguments via Bash integration
Skill({ skill: 'gemini-cli-security', args: 'src/ --scan-deps' });
# Analyze code in a directory
node .claude/skills/gemini-cli-security/scripts/main.cjs --target src/
# Scan dependencies for CVEs
node .claude/skills/gemini-cli-security/scripts/main.cjs --scan-deps
# JSON output for CI integration
node .claude/skills/gemini-cli-security/scripts/main.cjs --target . --json
# Scoped analysis with natural language
node .claude/skills/gemini-cli-security/scripts/main.cjs --target src/auth/ --scope "focus on token handling and session management"
Default output (markdown report):
## Security Analysis Report
### CRITICAL
- [AUTH-001] Hardcoded API key found in src/config.ts:42
Pattern: `const API_KEY = "sk-..."`
Remediation: Move to environment variable
### HIGH
- [INJ-002] SQL injection risk in src/db/users.ts:87
Pattern: String concatenation in query builder
Remediation: Use parameterized queries
### Dependencies
- lodash@4.17.15 → CVE-2021-23337 (HIGH) - Prototype pollution
Fix: Upgrade to lodash@4.17.21+
JSON output (--json flag):
{
"findings": [
{
"id": "AUTH-001",
"severity": "CRITICAL",
"category": "secrets",
"file": "src/config.ts",
"line": 42,
"description": "Hardcoded API key",
"remediation": "Move to environment variable"
}
],
"dependencies": [
{
"package": "lodash",
"version": "4.17.15",
"cve": "CVE-2021-23337",
"severity": "HIGH",
"fix": "4.17.21"
}
],
"summary": {
"critical": 1,
"high": 2,
"medium": 3,
"low": 0,
"precision": 0.9,
"recall": 0.93
}
}
The skill integrates with the OSV.dev API (no authentication required) to check dependencies:
// OSV.dev batch query endpoint
WebFetch({
url: 'https://api.osv.dev/v1/querybatch',
prompt: 'Extract vulnerability IDs, severity, and affected versions for these packages',
});
Supported ecosystems: npm, PyPI, RubyGems, Maven, Go, Cargo, NuGet, Packagist
The original extension supports PR analysis via GitHub Actions. This skill includes an equivalent workflow template:
# .github/workflows/security.yml
name: Security Analysis
on: [pull_request]
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run security analysis
run: node .claude/skills/gemini-cli-security/scripts/main.cjs --target . --json
Why native tools over MCP servers: The original extension uses two MCP servers (security analysis server + OSV-Scanner binary). This skill uses native Claude Code tools instead:
Deviation from source: The original uses Gemini AI for code analysis; this skill uses the pattern-based detection methodology documented in the extension's benchmarking. The AI analysis component can be provided by the invoking agent (security-architect) rather than an embedded AI call.
| Agent | Role |
|---|---|
security-architect | Primary: comprehensive security audits |
developer | Supporting: pre-commit security checks |
code-reviewer | Supporting: PR review security layer |
Before starting:
Read .claude/context/memory/learnings.md
After completing:
.claude/context/memory/learnings.md.claude/context/memory/issues.md.claude/context/memory/decisions.mdASSUME INTERRUPTION: If it's not in memory, it didn't happen.
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Ensure accessibility in UI components including semantic HTML, ARIA attributes, keyboard navigation, and WCAG 2.2 AA compliance.
日本語の概要は準備中です。原文の説明を表示しています。
Use when you want to improve response quality through meta-cognitive reasoning. Applies 15+ reasoning methods to reconsider and refine initial outputs.
日本語の概要は準備中です。原文の説明を表示しています。
N-round opposing-stance debates for trade-off analysis. Assigns pro/con roles to agents, runs structured debate rounds with quality scoring, and produces a moderator synthesis with confidence-rated recommendation. Generalizable to architecture, technology, security, and design decisions.
日本語の概要は準備中です。原文の説明を表示しています。
Force adversarial code review stance that eliminates confirmation bias — reviewer must find issues or re-analyze
日本語の概要は準備中です。原文の説明を表示しています。
Creates specialized AI agents on-demand when no existing agent matches a request. Use when the Router cannot find a suitable agent for a task. Enables self-evolution by generating persistent agents.
日本語の概要は準備中です。原文の説明を表示しています。
LLM-as-judge evaluation framework with 5-dimension rubric (accuracy, groundedness, coherence, completeness, helpfulness) for scoring AI-generated content quality with weighted composite scores and evidence citations
日本語の概要は準備中です。原文の説明を表示しています。