A comprehensive, modular security analysis tool for GitHub Actions that provides AI-powered analysis for malicious github actions, vulnerability detection, detailed reporting, and an intuitive web dashboard for results visualization.
- Python 3.8 or higher
- Google Gemini API key (for AI analysis)
- GitHub authentication (recommended)
-
Clone the repository
git clone https://github.com/suchithnarayan/actions-guard-hub.git cd actions-guard-hub -
Set up virtual environment (recommended)
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install dependencies
# Full installation (all AI providers) pip install -r requirements.txt # Minimal installation (Gemini only) pip install requests PyJWT cryptography PyYAML backoff json-repair python-dotenv langchain-core langchain-google-genai # Verify installation python verify_dependencies.py -
Set up environment variables
# Copy example environment file cp env.example .env # Create this if it doesn't exist # Edit .env with your API keys export GOOGLE_API_KEY="your_google_api_key" # For Gemini models (default) export OPENAI_API_KEY="your_openai_api_key" # For OpenAI models (optional) export GITHUB_PAT_TOKEN="your_github_token" # Optional but recommended
ActionsGuardHub provides comprehensive AI-powered security analysis for GitHub Actions with multiple input methods, flexible authentication options, and rich reporting capabilities. The tool features a modular architecture that supports various AI models through LangChain, analyzes 10+ security categories, and generates actionable recommendations. Developers can read more about detailed features in the documentation.
⚠️ Important: This tool uses AI models which may produce false positives or miss actual vulnerabilities. Always have security experts review AI-generated findings. See Disclaimers & Limitations for details.
- Generate a PAT at GitHub Settings > Developer settings > Personal access tokens
- Grant public_repo scope for public repositories
- Set environment variable:
export GITHUB_PAT_TOKEN="your_token_here"
- Create a GitHub App at GitHub Settings > Developer settings > GitHub Apps
- Generate and download the private key
- Install the app on your organization
- Set environment variables:
export GITHUB_APP_CLIENT_ID="your_client_id" export GITHUB_APP_PRIVATE_KEY="your_private_key" export GITHUB_APP_INSTALLATION_ID="your_installation_id"
The scanner uses LangChain for AI model management, supporting multiple providers:
| Google Gemini | gemini-2.5-flash (recommended), gemini-2.5-pro | GOOGLE_API_KEY | pip install langchain-google-genai |
| OpenAI | gpt-4o-mini (recommended), gpt-4o, gpt-3.5-turbo, o1-mini | OPENAI_API_KEY | pip install langchain-openai |
Each scan generates comprehensive security reports including basic information, security analysis summaries, detailed security checks across 10+ categories, and actionable recommendations. Results are available through an interactive web dashboard with filtering capabilities and can be exported in multiple formats (JSON, text reports). Read more in the documentation.
- Initial security screening of third-party actions
- Bulk analysis of large action repositories
- Educational purposes and security awareness
- Supplementing existing security review processes
- Identifying potential areas for deeper manual review
- Sole security validation for production systems
- Compliance certification without human review
- High-stakes security decisions without verification
- Replacing comprehensive security audits
- Legal or regulatory compliance as primary evidence
Remember: AI-powered security analysis is a powerful tool to augment human expertise, not replace it. Always combine AI insights with human judgment and comprehensive security practices.
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: This README and inline code documentation
- Contributing: See CONTRIBUTING.md for detailed guidelines
Made with ❤️ for the GitHub Actions security community
Star ⭐ this repository if you find it useful!
.png)
