sast-horusec
Horusecを活用し、18以上の言語に対応したSASTでコードの脆弱性を分析、Git履歴から機密情報を検出し、CI/CDパイプラインへの統合や誤検知管理を通じて、開発ライフサイクル全体のセキュリティを強化するSkill。
📜 元の英語説明(参考)
Multi-language static application security testing using Horusec with support for 18+ programming languages and 20+ security analysis tools. Performs SAST scans, secret detection in git history, and provides vulnerability findings with severity classification. Use when: (1) Analyzing code for security vulnerabilities across multiple languages simultaneously, (2) Detecting exposed secrets and credentials in git history, (3) Integrating SAST into CI/CD pipelines for secure SDLC, (4) Performing comprehensive security analysis during development, (5) Managing false positives and prioritizing security findings.
🇯🇵 日本人クリエイター向け解説
Horusecを活用し、18以上の言語に対応したSASTでコードの脆弱性を分析、Git履歴から機密情報を検出し、CI/CDパイプラインへの統合や誤検知管理を通じて、開発ライフサイクル全体のセキュリティを強化するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o sast-horusec.zip https://jpskill.com/download/17038.zip && unzip -o sast-horusec.zip && rm sast-horusec.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17038.zip -OutFile "$d\sast-horusec.zip"; Expand-Archive "$d\sast-horusec.zip" -DestinationPath $d -Force; ri "$d\sast-horusec.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
sast-horusec.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
sast-horusecフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 5
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Horusec SAST スキャナー
概要
Horusec は、20 以上の統合されたセキュリティツールを使用して、18 以上のプログラミング言語にわたって静的コード分析を実行するオープンソースのセキュリティ分析ツールです。開発中に脆弱性を特定し、公開されたシークレットについて git の履歴をスキャンし、安全な SDLC プラクティスを実現するために CI/CD パイプラインにシームレスに統合します。
サポートされている言語
C#, Java, Kotlin, Python, Ruby, Golang, Terraform, JavaScript, TypeScript, Kubernetes, PHP, C, HTML, JSON, Dart, Elixir, Shell, Nginx
クイックスタート
現在のプロジェクトで Horusec スキャンを実行します。
# Docker の使用 (推奨)
docker run -v /var/run/docker.sock:/var/run/docker.sock \
-v $(pwd):/src horuszup/horusec-cli:latest horusec start -p /src -P $(pwd)
# ローカルインストール
horusec start -p ./path/to/project
コアワークフロー
ワークフロー 1: ローカルセキュリティスキャン
コミット前のセキュリティ分析を実行する開発者向け:
- プロジェクトディレクトリに移動します。
- Horusec スキャンを実行します。
horusec start -p . -o json -O horusec-report.json - 脆弱性について JSON 出力を確認します。
- 重要度 (HIGH, MEDIUM, LOW, INFO) でフィルタリングします。
- 重要な重大度の高い調査結果に対処します。
- 修正を検証するために再スキャンします。
ワークフロー 2: CI/CD パイプラインの統合
進捗状況: [ ] 1. Horusec を CI/CD パイプライン構成に追加します。 [ ] 2. 出力形式を設定します (自動処理用の JSON)。 [ ] 3. ビルド失敗の重大度しきい値を設定します。 [ ] 4. 各コミットまたはプルリクエストでスキャンを実行します。 [ ] 5. 結果を解析し、重大度の高い調査結果でビルドを失敗させます。 [ ] 6. 監査証跡用のセキュリティレポートを生成します。 [ ] 7. 時間の経過に伴う修正の進捗状況を追跡します。
各ステップを体系的に進めてください。完了した項目をチェックしてください。
ワークフロー 3: Git 履歴シークレットスキャン
公開された認証情報とシークレットを検出するため:
- git 履歴分析を有効にして Horusec を実行します。
horusec start -p . --enable-git-history-analysis - 検出されたシークレットと認証情報を確認します。
- 侵害された認証情報を直ちにローテーションします。
- 検出されたパターンを
.gitignoreおよび.horusec/config.jsonに追加します。 - git-filter-branch または BFG Repo-Cleaner を使用して、履歴から削除します (必要な場合)。
- インシデントを文書化し、セキュリティ手順を更新します。
ワークフロー 4: 誤検知の管理
スキャン結果を管理し、ノイズを減らす場合:
- 初期スキャンを実行し、結果をエクスポートします。
horusec start -p . -o json -O results.json - 調査結果を確認し、誤検知を特定します。
- 無視ルールを使用して
.horusec/config.jsonを作成または更新します。{ "horusecCliRiskAcceptHashes": ["hash1", "hash2"], "horusecCliFilesOrPathsToIgnore": ["**/test/**", "**/vendor/**"] } - 再スキャンして、誤検知が抑制されていることを確認します。
- コンプライアンスのためにリスク受容の決定を文書化します。
- 無視された調査結果を定期的に確認します。
構成
カスタム構成のために、プロジェクトルートに .horusec/config.json を作成します。
{
"horusecCliCertInsecureSkipVerify": false,
"horusecCliCertPath": "",
"horusecCliContainerBindProjectPath": "",
"horusecCliCustomImages": {},
"horusecCliCustomRulesPath": "",
"horusecCliDisableDocker": false,
"horusecCliFalsePositiveHashes": [],
"horusecCliFilesOrPathsToIgnore": [
"**/node_modules/**",
"**/vendor/**",
"**/*_test.go",
"**/test/**"
],
"horusecCliHeaders": {},
"horusecCliHorusecApiUri": "",
"horusecCliJsonOutputFilePath": "./horusec-report.json",
"horusecCliLogFilePath": "./horusec.log",
"horusecCliMonitorRetryInSeconds": 15,
"horusecCliPrintOutputType": "text",
"horusecCliProjectPath": ".",
"horusecCliRepositoryAuthorization": "",
"horusecCliRepositoryName": "",
"horusecCliReturnErrorIfFoundVulnerability": false,
"horusecCliRiskAcceptHashes": [],
"horusecCliTimeoutInSecondsAnalysis": 600,
"horusecCliTimeoutInSecondsRequest": 300,
"horusecCliToolsConfig": {},
"horusecCliWorkDir": ".horusec"
}
出力形式
Horusec は、さまざまなユースケースに対応するために複数の出力形式をサポートしています。
text- 人間が読めるコンソール出力 (デフォルト)json- CI/CD 統合用の構造化 JSONsonarqube- SonarQube 互換形式
-o フラグで指定します。
horusec start -p . -o json -O report.json
一般的なパターン
パターン 1: 重大度の高い場合にビルドを失敗させる
重大な調査結果で失敗するように CI/CD を構成します。
horusec start -p . \
--return-error-if-found-vulnerability \
--severity-threshold="MEDIUM"
しきい値以上の脆弱性が見つかった場合、終了コードは 0 以外になります。
パターン 2: 複数プロジェクトのモノレポスキャン
モノレポ構造で複数のプロジェクトをスキャンします。
# 特定のサブディレクトリをスキャンします
for project in service1 service2 service3; do
horusec start -p ./$project -o json -O horusec-$project.json
done
パターン 3: カスタムルールの統合
カスタムセキュリティルールを追加します。
- カスタムルールファイルを作成します (YAML 形式)。
.horusec/config.jsonでパスを構成します。{ "horusecCliCustomRulesPath": "./custom-rules.yaml" }- カスタムルールを適用してスキャンを実行します。
セキュリティに関する考慮事項
- 機密データの処理: Horusec は、公開されたシークレットをスキャンします。スキャン結果が安全に保存され、アクセスが許可された担当者のみに制限されていることを確認してください。
- アクセス制御: Horusec 構成ファイルとスキャン結果へのアクセスを制限します。ソースコードスキャンには、Docker で読み取り専用マウントを使用します。
- 監査ログ: コンプライアンス監査のために、すべてのスキャン実行、調査結果、およびリスク受容の決定をログに記録します。
- コンプライアンス: 脆弱性を特定し、修正を追跡することにより、SOC2、PCI-DSS、および GDPR コンプライアンスと統合します。
- 安全なデフォルト: リスク許容度に適した重大度しきい値を構成します。ノイズを減らすために、MEDIUM または HIGH から開始します。
統合ポイント
CI/CD 統合
GitHub Actions:
- name: Run Horusec Security Scan
run: |
docker run -v /var/run/docker.sock:/var/run/docker.sock \
-v $(pwd):/src horuszup/horusec-cli:latest \
horusec start -p /src -o json -O ho
(原文がここで切り詰められています) 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Horusec SAST Scanner
Overview
Horusec is an open-source security analysis tool that performs static code analysis across 18+ programming languages using 20+ integrated security tools. It identifies vulnerabilities during development, scans git history for exposed secrets, and integrates seamlessly into CI/CD pipelines for secure SDLC practices.
Supported Languages
C#, Java, Kotlin, Python, Ruby, Golang, Terraform, JavaScript, TypeScript, Kubernetes, PHP, C, HTML, JSON, Dart, Elixir, Shell, Nginx
Quick Start
Run Horusec scan on current project:
# Using Docker (recommended)
docker run -v /var/run/docker.sock:/var/run/docker.sock \
-v $(pwd):/src horuszup/horusec-cli:latest horusec start -p /src -P $(pwd)
# Local installation
horusec start -p ./path/to/project
Core Workflows
Workflow 1: Local Security Scan
For developers performing pre-commit security analysis:
- Navigate to project directory
- Run Horusec scan:
horusec start -p . -o json -O horusec-report.json - Review JSON output for vulnerabilities
- Filter by severity (HIGH, MEDIUM, LOW, INFO)
- Address critical and high-severity findings
- Re-scan to validate fixes
Workflow 2: CI/CD Pipeline Integration
Progress: [ ] 1. Add Horusec to CI/CD pipeline configuration [ ] 2. Configure output format (JSON for automated processing) [ ] 3. Set severity threshold for build failures [ ] 4. Run scan on each commit or pull request [ ] 5. Parse results and fail build on high-severity findings [ ] 6. Generate security reports for audit trail [ ] 7. Track remediation progress over time
Work through each step systematically. Check off completed items.
Workflow 3: Git History Secret Scanning
For detecting exposed credentials and secrets:
- Run Horusec with git history analysis enabled:
horusec start -p . --enable-git-history-analysis - Review detected secrets and credentials
- Rotate compromised credentials immediately
- Add detected patterns to
.gitignoreand.horusec/config.json - Use git-filter-branch or BFG Repo-Cleaner to remove from history (if needed)
- Document incident and update security procedures
Workflow 4: False Positive Management
When managing scan results and reducing noise:
- Run initial scan and export results:
horusec start -p . -o json -O results.json - Review findings and identify false positives
- Create or update
.horusec/config.jsonwith ignore rules:{ "horusecCliRiskAcceptHashes": ["hash1", "hash2"], "horusecCliFilesOrPathsToIgnore": ["**/test/**", "**/vendor/**"] } - Re-run scan to verify false positives are suppressed
- Document risk acceptance decisions for compliance
- Periodically review ignored findings
Configuration
Create .horusec/config.json in project root for custom configuration:
{
"horusecCliCertInsecureSkipVerify": false,
"horusecCliCertPath": "",
"horusecCliContainerBindProjectPath": "",
"horusecCliCustomImages": {},
"horusecCliCustomRulesPath": "",
"horusecCliDisableDocker": false,
"horusecCliFalsePositiveHashes": [],
"horusecCliFilesOrPathsToIgnore": [
"**/node_modules/**",
"**/vendor/**",
"**/*_test.go",
"**/test/**"
],
"horusecCliHeaders": {},
"horusecCliHorusecApiUri": "",
"horusecCliJsonOutputFilePath": "./horusec-report.json",
"horusecCliLogFilePath": "./horusec.log",
"horusecCliMonitorRetryInSeconds": 15,
"horusecCliPrintOutputType": "text",
"horusecCliProjectPath": ".",
"horusecCliRepositoryAuthorization": "",
"horusecCliRepositoryName": "",
"horusecCliReturnErrorIfFoundVulnerability": false,
"horusecCliRiskAcceptHashes": [],
"horusecCliTimeoutInSecondsAnalysis": 600,
"horusecCliTimeoutInSecondsRequest": 300,
"horusecCliToolsConfig": {},
"horusecCliWorkDir": ".horusec"
}
Output Formats
Horusec supports multiple output formats for different use cases:
text- Human-readable console output (default)json- Structured JSON for CI/CD integrationsonarqube- SonarQube-compatible format
Specify with -o flag:
horusec start -p . -o json -O report.json
Common Patterns
Pattern 1: Fail Build on High Severity
Configure CI/CD to fail on critical findings:
horusec start -p . \
--return-error-if-found-vulnerability \
--severity-threshold="MEDIUM"
Exit code will be non-zero if vulnerabilities at or above threshold are found.
Pattern 2: Multi-Project Monorepo Scanning
Scan multiple projects in monorepo structure:
# Scan specific subdirectories
for project in service1 service2 service3; do
horusec start -p ./$project -o json -O horusec-$project.json
done
Pattern 3: Custom Rules Integration
Add custom security rules:
- Create custom rules file (YAML format)
- Configure path in
.horusec/config.json:{ "horusecCliCustomRulesPath": "./custom-rules.yaml" } - Run scan with custom rules applied
Security Considerations
- Sensitive Data Handling: Horusec scans for exposed secrets. Ensure scan results are stored securely and access is restricted to authorized personnel only
- Access Control: Limit access to Horusec configuration files and scan results. Use read-only mounts in Docker for source code scanning
- Audit Logging: Log all scan executions, findings, and risk acceptance decisions for compliance auditing
- Compliance: Integrates with SOC2, PCI-DSS, and GDPR compliance by identifying vulnerabilities and tracking remediation
- Safe Defaults: Configure severity thresholds appropriate for your risk tolerance. Start with MEDIUM or HIGH to reduce noise
Integration Points
CI/CD Integration
GitHub Actions:
- name: Run Horusec Security Scan
run: |
docker run -v /var/run/docker.sock:/var/run/docker.sock \
-v $(pwd):/src horuszup/horusec-cli:latest \
horusec start -p /src -o json -O horusec-report.json \
--return-error-if-found-vulnerability
GitLab CI:
horusec-scan:
image: horuszup/horusec-cli:latest
script:
- horusec start -p . -o json -O horusec-report.json
artifacts:
reports:
horusec: horusec-report.json
Jenkins:
stage('Security Scan') {
steps {
sh 'docker run -v $(pwd):/src horuszup/horusec-cli:latest horusec start -p /src'
}
}
VS Code Extension
Horusec provides a VS Code extension for real-time security analysis during development. Install from VS Code marketplace.
Vulnerability Management
Horusec can integrate with centralized vulnerability management platforms via:
- JSON output parsing
- Horusec Platform (separate web-based management tool)
- Custom integrations using API
Troubleshooting
Issue: Docker Socket Permission Denied
Solution: Ensure Docker socket has proper permissions:
sudo chmod 666 /var/run/docker.sock
# Or run with sudo (not recommended for CI/CD)
Issue: False Positives in Test Files
Solution: Exclude test directories in configuration:
{
"horusecCliFilesOrPathsToIgnore": ["**/test/**", "**/*_test.go", "**/tests/**"]
}
Issue: Scan Timeout on Large Repositories
Solution: Increase timeout values in configuration:
{
"horusecCliTimeoutInSecondsAnalysis": 1200,
"horusecCliTimeoutInSecondsRequest": 600
}
Issue: Missing Vulnerabilities for Specific Language
Solution: Verify language is supported and Docker images are available:
horusec version --check-for-updates
docker pull horuszup/horusec-cli:latest
Advanced Usage
Running Without Docker
Install Horusec CLI directly (requires all security tool dependencies):
# macOS
brew install horusec
# Linux
curl -fsSL https://raw.githubusercontent.com/ZupIT/horusec/main/deployments/scripts/install.sh | bash
# Windows
# Download from GitHub releases
Then run:
horusec start -p . --disable-docker
Note: Running without Docker requires manual installation of all security analysis tools (Bandit, Brakeman, GoSec, etc.)
Severity Filtering
Filter results by severity in output:
# Only show HIGH and CRITICAL
horusec start -p . --severity-threshold="HIGH"
# Show all findings
horusec start -p . --severity-threshold="INFO"
Custom Docker Images
Override default security tool images in configuration:
{
"horusecCliCustomImages": {
"python": "my-registry/custom-bandit:latest",
"go": "my-registry/custom-gosec:latest"
}
}
Report Analysis
Parse JSON output for automated processing:
# Extract high-severity findings
cat horusec-report.json | jq '.analysisVulnerabilities[] | select(.severity == "HIGH")'
# Count vulnerabilities by language
cat horusec-report.json | jq '.analysisVulnerabilities | group_by(.language) | map({language: .[0].language, count: length})'
# List unique CWE IDs
cat horusec-report.json | jq '[.analysisVulnerabilities[].securityTool] | unique'
References
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (10,272 bytes)
- 📎 assets/ci-config-template.yml (11,105 bytes)
- 📎 assets/rule-template.yaml (11,044 bytes)
- 📎 references/EXAMPLE.md (15,672 bytes)
- 📎 references/WORKFLOW_CHECKLIST.md (8,390 bytes)