-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b7e6ee
commit 33c0f6e
Showing
1 changed file
with
38 additions
and
0 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,38 @@ | ||
name: Docker Bench for Security | ||
|
||
on: | ||
pull_request: | ||
branches: [ develop ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
docker-bench-security: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.8" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install . | ||
- name: Run Docker Bench for Security | ||
run: | | ||
mkdir -p results | ||
docker run --rm --privileged --pid host \ | ||
--volume /var/run/docker.sock:/var/run/docker.sock \ | ||
--volume /usr:/usr \ | ||
--volume /etc:/etc \ | ||
--volume /lib/modules:/lib/modules:ro \ | ||
docker/docker-bench-security > results/docker-bench-results.txt | ||
- name: Upload Results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: docker-bench-results | ||
path: results/docker-bench-results.txt |