
GitHubワークフローにおけるセキュリティ問題を特定するためのワークフロー監査ツール
usage: main.py [-h] [--type {repo,org,user}] [--log-level {debug,info,warning,error,critical}] input
Identify vulnerabilities in GitHub Actions workflow
positional arguments:
input User/Org Name or Repo name (owner/repo).
optional arguments:
-h, --help show this help message and exit
--type {repo,org,user}
Type of entity that is being scanned.
--log-level {debug,info,warning,error,critical}
Log level for output
例:
python3 main.py --type org googlepython3 main.py --type user test_userpython3 main.py --type repo TinderSec/gh-workflow-auditorGitHub Workflow Auditor は GitHub の GraphQL エンドポイントを使用します。このため、API トークンが必要です。プログラムは PAT 環境変数からトークンを読み取ります。スコープなしの基本的な PAT トークン(https://github.com/settings/tokens/new)を生成できます。一部の組織では、トークンを利用できるようにするために「SSO の設定」が必要な場合があることに注意してください。
export PAT=ghp_YOUR_TOKEN
GitHub Workflow Auditor は、GitHub Workflows の脆弱性を特定します。ワークフローファイルをスキャンして、ユーザー入力を安全でない方法で取り込んだり、ビルドプロセスで悪意のあるコミットを使用したりするなどのアンチパターンを検出します。このツールは、個別のリポジトリ、またはユーザーや組織がアクセス可能なすべてのリポジトリのスキャンをサポートしています。スキャンの出力は scan.log に保存されます。