Skip to content

Commit 4ba7d84

Browse files
feat: rebased the main branch
1 parent 7bf474b commit 4ba7d84

2 files changed

Lines changed: 50 additions & 2 deletions

File tree

.github/workflows/build.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ jobs:
4343
matrix:
4444
# It is recommended to pin a Runner version specifically:
4545
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
46-
os: [ubuntu-latest, macos-latest, windows-latest]
46+
#os: [ubuntu-latest, macos-latest, windows-latest]
47+
os: [ubuntu-latest]
4748
python: ['3.9', '3.10']
4849
steps:
4950

@@ -74,13 +75,27 @@ jobs:
7475

7576
# Audit all currently installed packages for security vulnerabilities.
7677
- name: Audit installed packages
77-
run: make audit
78+
id: audit-packages
79+
continue-on-error: true
80+
run: make --silent audit > vulnerabilities.txt
81+
82+
# Upload the vulnerabilities file output.
83+
- name: Upload Artifact
84+
id: upload-audit-artifact
85+
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb #v3.1.1
86+
with:
87+
name: vulnerabilities.txt
88+
path: .
89+
if-no-files-found: error
90+
retention-days: 1
91+
#if: steps.audit-packages.outputs.exit_code == 1
7892

7993
# Build the sdist and wheel distribution of the package and docs as a zip file.
8094
# We don't need to check and test the package separately because `make dist` runs
8195
# those targets first and only builds the package if they succeed.
8296
- name: Build the package
8397
run: make dist
98+
continue-on-error: true
8499

85100
# Generate the requirements.txt that contains the hash digests of the dependencies and
86101
# generate the SBOM using CyclonDX SBOM generator.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Comment vulnerabilities on Pull Requests
2+
on:
3+
pull_request:
4+
branches:
5+
- '*'
6+
types:
7+
- opened
8+
- reopened
9+
- edited
10+
- synchronize
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
comment-audit:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
pull-requests: write
19+
needs: build
20+
steps:
21+
22+
- name: Download artifact from Build
23+
uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 #v3
24+
#if: steps.audit-packages.outputs.exit_code == 1
25+
with:
26+
name: vulnerabilities.txt
27+
28+
- name: comment PR
29+
id: comment-pr
30+
run: gh pr comment ${{ github.event.number }} --body-file vulnerabilities.txt
31+
#if: steps.audit-packages.outputs.exit_code == 1
32+
env:
33+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)