|
| 1 | +name: Dependency scan |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + branches: [main] |
| 6 | + |
| 7 | +permissions: |
| 8 | + contents: read |
| 9 | + |
| 10 | +jobs: |
| 11 | + fpvs: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + strategy: |
| 14 | + fail-fast: false |
| 15 | + matrix: |
| 16 | + python-version: ["3.12"] |
| 17 | + |
| 18 | + steps: |
| 19 | + - name: Checkout repository |
| 20 | + uses: actions/checkout@v4 |
| 21 | + |
| 22 | + - name: Set up Python ${{ matrix.python-version }} |
| 23 | + uses: actions/setup-python@v5 |
| 24 | + with: |
| 25 | + python-version: ${{ matrix.python-version }} |
| 26 | + |
| 27 | + - name: Install dependencies |
| 28 | + run: | |
| 29 | + python -m venv ./venv |
| 30 | + source ./venv/bin/activate |
| 31 | + echo "PATH=${PATH}" >> "${GITHUB_ENV}" |
| 32 | + python -m pip install --upgrade pip |
| 33 | + python -m pip install --requirement requirements.txt |
| 34 | + python -m pip install wheel |
| 35 | + python -m pip wheel -r requirements.txt --wheel-dir=vendor |
| 36 | +
|
| 37 | + - name: Run fpvs scan |
| 38 | + run: | |
| 39 | + python -m pip install fpvs |
| 40 | + git clone https://gitlab.com/gitlab-org/security-products/gemnasium-db.git |
| 41 | + fpvs-scan --verbose |
| 42 | +
|
| 43 | + pip-audit: |
| 44 | + runs-on: ubuntu-latest |
| 45 | + strategy: |
| 46 | + fail-fast: false |
| 47 | + matrix: |
| 48 | + python-version: ["3.12"] |
| 49 | + |
| 50 | + steps: |
| 51 | + - name: Checkout repository |
| 52 | + uses: actions/checkout@v4 |
| 53 | + |
| 54 | + - name: Set up Python ${{ matrix.python-version }} |
| 55 | + uses: actions/setup-python@v5 |
| 56 | + with: |
| 57 | + python-version: ${{ matrix.python-version }} |
| 58 | + |
| 59 | + - name: Install dependencies |
| 60 | + run: | |
| 61 | + python -m venv ./venv |
| 62 | + source ./venv/bin/activate |
| 63 | + echo "PATH=${PATH}" >> "${GITHUB_ENV}" |
| 64 | + python -m pip install --requirement requirements.txt |
| 65 | + python -m pip install . |
| 66 | +
|
| 67 | + - name: Run pip-audit |
| 68 | + |
| 69 | + with: |
| 70 | + inputs: requirements.txt |
0 commit comments