Skip to content

Commit 9753c7a

Browse files
authored
fix(workflow): update security check (#32)
* update security check * add container
1 parent 1938702 commit 9753c7a

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

.github/workflows/security.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: SecurityChecks
1+
name: Security Checks
22
on:
33
workflow_dispatch:
44
pull_request: {}
@@ -8,19 +8,21 @@ on:
88
- cron: "30 20 * * *"
99
jobs:
1010
semgrep:
11+
if: (github.actor != 'dependabot[bot]')
12+
permissions: write-all
1113
name: Scan
12-
runs-on: [ubuntu-latest] # nosemgrep : semgrep.dev/s/swati31196:github_provided_runner
14+
runs-on: ubuntu-latest # nosemgrep : semgrep.dev/s/swati31196:github_provided_runner
15+
container:
16+
image: returntocorp/semgrep
1317
steps:
14-
- uses: actions/checkout@v2
15-
- uses: returntocorp/semgrep-action@v1
16-
with:
17-
publishToken: ${{ secrets.SEMGREP_APP_TOKEN }}
18-
publishDeployment: 339
18+
- uses: actions/checkout@v3
19+
- run: semgrep ci
1920
env:
21+
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
2022
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2123

2224
workflow_status:
23-
runs-on: [ubuntu-latest] # nosemgrep : semgrep.dev/s/swati31196:github_provided_runner
25+
runs-on: ubuntu-latest # nosemgrep : semgrep.dev/s/swati31196:github_provided_runner
2426
name: Update Status Check
2527
needs: [semgrep]
2628
if: always()
@@ -29,7 +31,7 @@ jobs:
2931
steps:
3032
- name: Set github commit id
3133
run: |
32-
if [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "schedule" ]; then
34+
if [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "schedule" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
3335
echo "githubCommit=${{ github.sha }}" >> $GITHUB_ENV
3436
fi
3537
exit 0

0 commit comments

Comments
 (0)