Skip to content

Commit

Permalink
chore: Add dependency auditing with pip-audit (#458)
Browse files Browse the repository at this point in the history
  • Loading branch information
svenaas committed May 6, 2024
1 parent e7d3cc5 commit 366093c
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
57 changes: 57 additions & 0 deletions ci/pipeline-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,63 @@ jobs:
username: ((slack-username))
icon_url: ((slack-icon-url))

- name: audit-dependencies
plan:
- get: src
resource: pr-((git-branch))
trigger: true
passed: [set-pipeline]

- put: src
resource: pr-((git-branch))
params:
path: src
status: pending
base_context: concourse
context: audit-dependencies

- task: pip-audit
run:
path: pip-audit
args:
- -r
- ./requirements.txt

on_failure:
in_parallel:
- put: src
resource: pr-((git-branch))
params:
path: src
status: failure
base_context: concourse
context: audit-dependencies
- put: slack
params:
text: |
:x: FAILED: dependency audit on pages-build-container pr-((git-branch))
<$ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME?vars.deploy-env="((deploy-env))"|View build details>
channel: ((slack-channel))
username: ((slack-username))
icon_url: ((slack-icon-url))

on_success:
in_parallel:
- put: src
resource: pr-((git-branch))
params:
path: src
status: success
base_context: concourse
context: audit-dependencies
- put: slack
params:
text: |
:white_check_mark: SUCCESS: Successfully passed dependency audit on pages-build-container pr-((git-branch))
channel: ((slack-channel))
username: ((slack-username))
icon_url: ((slack-icon-url))

############################
# RESOURCES

Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
bandit>=1.0,<2.0
flake8==3.8.3
moto==5.0.1
pip-audit==2.7.3
pyfakefs==4.0.2
pyflakes==2.2.0
pylint==2.5.3
Expand Down

0 comments on commit 366093c

Please sign in to comment.