feat: add typosquatting analyzer for go modules #632
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: GuardDog | |
on: | |
pull_request: | |
branches: | |
- main | |
- v* | |
permissions: | |
contents: read | |
jobs: | |
guarddog: | |
permissions: | |
contents: read # for actions/checkout to fetch code | |
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | |
name: Scan dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install GuardDog | |
run: pip install guarddog | |
- run: guarddog pypi verify requirements.txt --output-format sarif --exclude-rules repository_integrity_mismatch > guarddog.sarif | |
- name: Upload SARIF file for GitHub code scanning | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
category: guarddog-builtin | |
sarif_file: guarddog.sarif | |