Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions .github/workflows/security-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,43 +15,43 @@ jobs:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Checkout vulnerable code repository
uses: actions/checkout@v4
with:
path: target-repo
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests

- name: Clone Security Agent
run: |
git clone https://github.com/security-ai-labs/security-ai-agent.git temp-agent
cp temp-agent/main.py .
cp temp-agent/web3_analyzer.py .
cp temp-agent/github_pr_commenter.py .
cp temp-agent/security_rules.py .
cp temp-agent/requirements.txt .
rm -rf temp-agent
- name: Checkout Security Agent
uses: actions/checkout@v4
with:
repository: security-ai-labs/security-ai-agent
path: security-agent
ref: main

- name: Install Security Agent Dependencies
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r security-agent/requirements.txt

- name: Run Security Analysis
run: python main.py
- name: Run Security Analysis on Target Repository Only
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
PR_NUMBER: ${{ github.event.pull_request.number }}
REPO_NAME: ${{ github.repository }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
cd security-agent
python main.py --target ../target-repo
working-directory: ${{ github.workspace }}

- name: Analysis Complete
- name: Upload Analysis Results
if: always()
run: echo "✅ Security analysis completed"
uses: actions/upload-artifact@v4
with:
name: security-analysis-results
path: security-agent/analysis-*.json
retention-days: 30
Loading