Skip to content

Commit b75b1fd

Browse files
committed
add security checks on push action
1 parent e778ea3 commit b75b1fd

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.github/workflows/on-push.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Push Workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types:
9+
- opened
10+
- edited
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
security-checks:
17+
uses: ./.github/workflows/run-security-checks.yml
18+
secrets: inherit
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Run security checks on the project
2+
3+
on:
4+
workflow_call:
5+
workflow_dispatch:
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
scan:
12+
runs-on: ubuntu-latest
13+
steps:
14+
# Checkout and setup.
15+
- name: Checkout repository
16+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
17+
- name: Install dependencies
18+
run: npm install
19+
20+
# NPM audit.
21+
- name: Run audit
22+
run: npm audit
23+
24+
# GitLeaks.
25+
- name: Run Gitleaks
26+
uses: gitleaks/gitleaks-action@4df650038e2eb9f7329218df929c2780866e61a3
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}
30+

0 commit comments

Comments
 (0)