
GitHub Action Workflow 파일의 잠재적 취약점을 감사하기 위한 스크립트입니다.
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 구성(Configure SSO)"을 해야 할 수도 있습니다.
export PAT=ghp_YOUR_TOKEN
GitHub Workflow Auditor는 GitHub Workflow의 취약점을 식별합니다. 워크플로우 파일에서 안전하지 않은 방식으로 사용자 입력을 수용하거나 빌드 프로세스에서 악의적인 커밋을 사용하는 등의 안티 패턴을 스캔하는 방식으로 작동합니다. 이 도구는 개별 리포지토리 또는 사용자나 조직이 접근 가능한 모든 리포지토리를 스캔할 수 있습니다. 스캔 결과는 scan.log로 저장됩니다.