diff --git a/.gitea/workflows/sca.yml b/.gitea/workflows/sca.yml index 77f4d2a..6858342 100644 --- a/.gitea/workflows/sca.yml +++ b/.gitea/workflows/sca.yml @@ -10,27 +10,19 @@ jobs: pip-audit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout code + run: | + git clone https://oauth2:${{ secrets.GITEA_TOKEN }}@git.akarkode.com/${{ gitea.repository }}.git repo + cd repo && git checkout ${{ gitea.sha }} - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - name: Install tools - run: pip install pipenv pip-audit - - - name: Install dependencies - run: pipenv install --deploy + - name: Install pip-audit + run: pip3 install pip-audit - name: Run pip-audit scan - run: pipenv run pip-audit --format json -o pip-audit-report.json || true + working-directory: repo + run: | + pip-audit -r Pipfile.lock || true - name: Fail on HIGH/CRITICAL - run: pipenv run pip-audit --fail-on-severity high - - - name: Upload report - uses: actions/upload-artifact@v4 - if: always() - with: - name: pip-audit-report - path: pip-audit-report.json \ No newline at end of file + working-directory: repo + run: pip-audit -r Pipfile.lock --fail-on-severity high \ No newline at end of file