-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #144 from inab/143-integrate-pip-audit-in-the-ci-w…
…orkflows First test integrating 143 integrate pip audit in the ci workflows
- Loading branch information
Showing
6 changed files
with
102 additions
and
12 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: pip-audit | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 12 * * 1" | ||
|
||
jobs: | ||
pip-audit: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ] | ||
name: pip-audit python ${{ matrix.python-version }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
cache-dependency-path: | | ||
requirements.txt | ||
architecture: x64 | ||
- name: 'Install requirements (standard or constraints ${{ matrix.python-version }})' | ||
run: | | ||
pip install --upgrade pip wheel | ||
pip install -r requirements.txt -c constraints-${{ matrix.python-version }}.txt | ||
# - name: 'Freeze Python ${{ matrix.python-version }} constraints' | ||
# run: | | ||
# pip freeze > constraints-${{ matrix.python-version }}.txt | ||
- id: gen-cve-output | ||
uses: pypa/[email protected] | ||
- name: show_markdown | ||
run: | | ||
# echo "storing to file: ${{ steps.gen-cve-output.outputs.internal-be-careful-output }}" | ||
# echo ${{ steps.gen-cve-output.outputs.internal-be-careful-output }} > $GITHUB_WORKSPACE/security_scans.md | ||
# echo "saved." | ||
type -a pip-audit | ||
cat <<EOF | ||
${{ steps.gen-cve-output.outputs.internal-be-careful-output }} | ||
EOF | ||
# - uses: actions/upload-artifact@v3 | ||
# with: | ||
# retention-days: 2 | ||
# path: constraints-${{ matrix.python-version }}.txt | ||
# | ||
# pull_request_changes: | ||
# # Do this only when it is not a pull request validation | ||
# if: github.event_name != 'pull_request' | ||
# runs-on: ubuntu-latest | ||
# name: Pull request with the newly generated contents | ||
# needs: | ||
# - pre-commit | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - uses: actions/download-artifact@v3 | ||
# with: | ||
# path: changes-dir | ||
# - name: Move artifacts to their right place | ||
# run: | | ||
# cp -dpr changes-dir/artifact/* . | ||
# rm -r changes-dir/artifact | ||
# - name: Create Pull Request | ||
# id: cpr | ||
# uses: peter-evans/create-pull-request@v5 | ||
# with: | ||
# title: Updated constraints (triggered by ${{ github.sha }}) | ||
# branch: create-pull-request/patch-constraints | ||
# delete-branch: true | ||
# commit-message: "[create-pull-request] Automatically commit updated contents (constraints)" | ||
# - name: Check outputs | ||
# if: ${{ steps.cpr.outputs.pull-request-number }} | ||
# run: | | ||
# echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | ||
# echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |
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
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
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
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
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