-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (74 loc) · 2.24 KB
/
ci.yml
File metadata and controls
94 lines (74 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: First interaction
uses: actions/first-interaction@v1.3.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'Thank you for your issue!'
pr-message: 'Thank you for your pull request!'
- name: Upload Tool Results To Pixeebot
uses: pixee/upload-tool-results-action@v2.3.0
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
security:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install safety
pip install trufflehog
npm install -g snyk
npm install -g @actions/core @actions/github
- name: Install Gitleaks
run: |
wget https://github.com/gitleaks/gitleaks/releases/download/v8.20.1/gitleaks_8.20.1_linux_x64.tar.gz
tar -xzf gitleaks_8.20.1_linux_x64.tar.gz
sudo mv gitleaks /usr/local/bin/
chmod +x /usr/local/bin/gitleaks
- name: Run Safety
run: |
safety check --full-report || true
- name: Run truffleHog
run: |
trufflehog filesystem --directory . --json | tee trufflehog_results.json || true
- name: Run Gitleaks
run: |
gitleaks detect --source . --report-format json --report-path gitleaks_results.json || true
- name: Run Snyk
run: |
snyk auth ${{ secrets.SNYK_TOKEN }}
snyk test || true
continue-on-error: true
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: security-reports
path: |
trufflehog_results.json
gitleaks_results.json