Skip to content

Commit

Permalink
Add nancy go code scan
Browse files Browse the repository at this point in the history
  • Loading branch information
miz060 committed Feb 19, 2025
1 parent 7663ead commit 86d4547
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/nancy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Go Dependency Security Check (Nancy)

on:
pull_request:
branches:
- msft-main # Adjust if needed
push:
branches:
- mitchzhu/clippy

jobs:
nancy:
name: Run Nancy SDL Check on Go Dependencies
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable # Use latest stable Go version

- name: Install Nancy via Go
run: |
echo "Installing Nancy..."
go install github.com/sonatype-nexus-community/nancy@latest
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Verify Nancy Installation
run: |
echo "Checking Nancy installation..."
nancy --help || echo "Nancy installed successfully!"
- name: Run Nancy on `src/runtime`
working-directory: src/runtime
run: |
echo "Running Nancy vulnerability scan on Go dependencies..."
go list -m all | nancy sleuth

0 comments on commit 86d4547

Please sign in to comment.