Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: pin bandit to the latest version #191

Merged
merged 7 commits into from
Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,35 @@ jobs:
name: Test bandit
steps:
- name: Checkout
uses: actions/checkout@v3.5.0
uses: actions/checkout@v3

- name: shellcheck
uses: reviewdog/action-shellcheck@v1.17

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Docker Build
uses: docker/build-push-action@v4
with:
context: .
push: false
load: true
tags: ghcr.io/tj-actions/bandit:latest
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Run bandit
uses: ./

- name: Run bandit with a single target
uses: ./
with:
targets: "test_package"

- name: Run bandit with a list of targets
uses: ./
with:
Expand Down
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ FROM python:3.11.3-slim-buster

LABEL maintainer="Tonye Jack <jtonye@ymail.com>"

COPY requirements.txt .

RUN python3 -m venv /venv && \
/venv/bin/pip3 install bandit
/venv/bin/pip3 install -U pip && \
/venv/bin/pip3 install -r requirements.txt

ENV PATH="/venv/bin:${PATH}"

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bandit==1.7.5