Add nancy go code scan #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
run: | | |
echo "Installing Nancy..." | |
curl -s https://raw.githubusercontent.com/sonatype-nexus-community/nancy/main/install-nancy.sh | bash | |
nancy version | |
- 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 |