Skip to content

Commit

Permalink
Fix the Workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
developerkunal committed Sep 3, 2024
1 parent 8fa60d5 commit e83c48d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/govulncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,10 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
name: Scan for Vulnerabilities in Code (Internal PR)
- name: Scan for Vulnerabilities in Code
uses: golang/govulncheck-action@dd0578b371c987f96d1185abb54344b44352bd58 # [email protected]
with:
go-version-file: go.mod
go-package: ./...
check-latest: true
repo-checkout: false

- if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
name: Skip Vulnerability Scan (External PR)
run: echo "Skipping vulnerability scan for external PRs"
10 changes: 2 additions & 8 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Semgrep

on:
merge_group:
pull_request:
types:
- opened
Expand All @@ -28,19 +27,14 @@ jobs:

steps:
- if: github.actor == 'dependabot[bot]' || github.event_name == 'merge_group'
run: exit 0 # Skip unnecessary test runs for dependabot and merge queues. Artifically flag as successful, as this is a required check for branch protection.
run: exit 0 # Skip unnecessary test runs for dependabot and merge queues.

- name: Checkout Code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
name: Run Semgrep for internal PRs
- name: Run Semgrep
run: semgrep ci
env:
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_TOKEN }}

- if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
name: Skip Semgrep for external PRs
run: echo "Skipping Semgrep for external PRs as secrets are not available"

0 comments on commit e83c48d

Please sign in to comment.