Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

docker updates #1

Draft
wants to merge 689 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
689 commits
Select commit Hold shift + click to select a range
8163884
update benchmark_log.png and contributors
konstruktoid Nov 5, 2019
85544e1
Merge pull request #403 from konstruktoid/verimage
konstruktoid Nov 5, 2019
b302990
remove macosx shadow...
konstruktoid Nov 5, 2019
c2caa29
Merge pull request #404 from konstruktoid/logimg
konstruktoid Nov 5, 2019
d2963b4
Reorder of sed command on images
jammasterj89 Dec 4, 2019
c35d71f
Merge pull request #406 from jammasterj89/master
konstruktoid Dec 4, 2019
1b37a1e
fix: allow combining include and exclude
wilmardo Dec 4, 2019
cf9baa7
feat: improve sed match
wilmardo Dec 5, 2019
91d36b6
refact: removes variable, use result directly in loop
wilmardo Dec 5, 2019
f1c4dc4
docs: Adds example of combining include and exclude
wilmardo Dec 5, 2019
155c739
feat: all mixes of include and excludes are now supported
wilmardo Dec 9, 2019
e21999c
catch json w/o space #408
konstruktoid Dec 12, 2019
3c545da
Merge pull request #409 from konstruktoid/ISSUE408
konstruktoid Dec 13, 2019
c8c5615
correct grep #410
konstruktoid Dec 16, 2019
19173cb
Merge pull request #411 from konstruktoid/ISSUE410
konstruktoid Dec 17, 2019
269b71e
locate configuration file before we run the tests #410
konstruktoid Dec 17, 2019
d9a70bc
Merge pull request #412 from konstruktoid/ISSUE410b
konstruktoid Dec 18, 2019
685236f
alpine:3.11
konstruktoid Dec 21, 2019
9696a8b
Merge pull request #413 from konstruktoid/alpineupdate
konstruktoid Dec 21, 2019
4054055
fix: uncomment PATH variable
wilmardo Jan 29, 2020
11da147
Merge pull request #407 from Intermax-Cloudsourcing/allow-include-che…
konstruktoid Jan 29, 2020
b16da2c
Fix check condition
zawazawa0316 Mar 3, 2020
e1feca8
Merge pull request #417 from zawazawa0316/fix_2_5
konstruktoid Mar 3, 2020
12f19d9
Fix check conditions
zawazawa0316 Mar 6, 2020
b046f93
remove single space at line 230
zawazawa0316 Mar 9, 2020
3356633
fix line 230
zawazawa0316 Mar 9, 2020
937ec49
Merge pull request #419 from zawazawa0316/fix_5
konstruktoid Mar 9, 2020
b3488e7
macOS user instructions. ref #158
konstruktoid Apr 1, 2020
0307da4
Merge pull request #421 from konstruktoid/issue158
konstruktoid Apr 1, 2020
d42fedc
fix(sh): check default ubuntu locations of docker.service and docker.…
illyaMs Apr 10, 2020
51bc75e
fix(docs): explain the need of mounting `/lib/systemd/system` folder …
illyaMs Apr 10, 2020
9f92e46
use opensuse/leap, and remove awk linkage
konstruktoid Apr 15, 2020
2972b68
Merge pull request #427 from konstruktoid/ISSUE425
konstruktoid Apr 15, 2020
2cdfa3d
Merge pull request #423 from illyaMs/master
konstruktoid Apr 15, 2020
3c38419
update README, correct volume binary paths
konstruktoid Apr 16, 2020
d53ac42
Merge pull request #428 from konstruktoid/ISSUE424
konstruktoid Apr 16, 2020
1c2b912
fix MacOSX volume, and lint
konstruktoid Apr 17, 2020
d32d4f3
Merge pull request #429 from konstruktoid/ISSUE422
konstruktoid Apr 17, 2020
5210cc9
by an appropriate
konstruktoid Apr 17, 2020
79ef925
Merge pull request #430 from konstruktoid/ISSUE422b
konstruktoid Apr 17, 2020
4612146
Add CIS Level 1 only functions
HristoStoyanovMM May 7, 2020
735938a
Merge pull request #434 from HristoStoyanovMM/CIS_Level1_only_checks
konstruktoid May 8, 2020
98acc66
map desc_ to benchmark headings
konstruktoid May 8, 2020
375d32c
Merge pull request #435 from konstruktoid/scoring
konstruktoid May 8, 2020
8aec461
more flexible binary usage, better support for mac os
konstruktoid May 8, 2020
1e0a10b
Merge pull request #436 from konstruktoid/macnetstat
konstruktoid May 8, 2020
aa984c4
alpine:3.12
konstruktoid Jun 1, 2020
d6969dd
Merge pull request #438 from konstruktoid/alpine
konstruktoid Jun 1, 2020
b3182ca
Remove prefix of check ID
roman-mueller Jun 2, 2020
41593e8
Merge pull request #439 from roman-mueller/fix_description
konstruktoid Jun 2, 2020
4cfb58f
Limit the number of reported items
mstemm Jul 10, 2020
b6478e9
Merge pull request #374 from draios/limit-num-items-reported
konstruktoid Jul 13, 2020
919816d
Changed to 'df' to support user namespaces
markdumay Sep 28, 2020
d85c733
Updated mountpoint check to support user namespace
markdumay Sep 29, 2020
f3e9c79
Merge pull request #444 from markdumay/partition
konstruktoid Sep 29, 2020
0f3dfe7
Deprecate rule 2.16 for Docker > 19.03
thaJeztah Oct 2, 2020
93c619f
Merge pull request #445 from thaJeztah/no_experimental
konstruktoid Oct 2, 2020
3877abd
print img if empty RepoTags, and fix tabbing
konstruktoid Nov 2, 2020
6ad1a1e
Merge pull request #451 from konstruktoid/imgname
konstruktoid Nov 2, 2020
1ea667f
Remove container after run.
Constantin07 Nov 17, 2020
ca0db88
Merge pull request #454 from Constantin07/do_not_leave_dangling_conta…
konstruktoid Nov 18, 2020
b7d8805
Update README.md
sa7mon Nov 30, 2020
75fe107
Merge pull request #457 from sa7mon/patch-1
konstruktoid Nov 30, 2020
f47f615
Update alpine to 3.13.0
jammasterj89 Jan 15, 2021
d3d25c8
Update Dockerfile
konstruktoid Jan 15, 2021
8bd04d6
Merge pull request #460 from jammasterj89/master
konstruktoid Jan 15, 2021
47e4cc1
Fix check_2 to -le 644
jammasterj89 Jan 15, 2021
f8c9b0f
Replace multiple -eq with -le
jammasterj89 Jan 15, 2021
7c881b4
Merge pull request #461 from jammasterj89/master
konstruktoid Jan 15, 2021
cf7c50b
Update README.md
Feb 23, 2021
3732a47
Update README.md
Feb 23, 2021
dcf4788
Merge pull request #463 from archaeogeek/patch-1
konstruktoid Feb 23, 2021
e9b9bfd
Update 4_container_images.sh
Feb 25, 2021
c8984e9
Merge pull request #464 from archaeogeek/patch-2
konstruktoid Feb 25, 2021
4b4fdd9
Add current year to the copyright header
razvanstoica89 Mar 8, 2021
1aa919e
Merge pull request #466 from razvanstoica89/master
konstruktoid Mar 8, 2021
94900ee
Change global variable used only locally to local variable for simpli…
razvanstoica89 Mar 9, 2021
8e0daa1
Print date and time in ISO 8601 UTC format
razvanstoica89 Mar 9, 2021
c351120
Add support for logging remediation measures in JSON format
razvanstoica89 Mar 9, 2021
519f20b
Append JSON logs when run multiple times
razvanstoica89 Mar 9, 2021
58205d4
Add new programs to the list of required programs
razvanstoica89 Mar 9, 2021
c00ef43
Add details about remediations measure for host configuration tests
razvanstoica89 Mar 9, 2021
2132b03
Usage instructions aligned between the README.md and docker-bench-sec…
razvanstoica89 Mar 10, 2021
9ae0d92
Fix "nohealthlocal: command not found" error
razvanstoica89 Mar 10, 2021
6c586b4
Print remediation measures at the end of the logs
razvanstoica89 Mar 10, 2021
f769a32
Update benchmark log photo
razvanstoica89 Mar 11, 2021
85117ea
Improve wording
razvanstoica89 Mar 11, 2021
1623c45
Set a relative image link
razvanstoica89 Mar 11, 2021
82bbe1d
Update benchmark log photo
razvanstoica89 Mar 11, 2021
b3a36e8
Print Section B only if it contains remediation measures
razvanstoica89 Mar 11, 2021
c623d3a
Print the remediation measure only if the check is not passed
razvanstoica89 Mar 11, 2021
59a63dd
Print more details in help message
razvanstoica89 Mar 11, 2021
ad62371
Move all pictures to a dedicated folder
razvanstoica89 Mar 11, 2021
ed23f2d
Change default log locations
razvanstoica89 Mar 11, 2021
82ecb7e
README file updated with new default logs location
razvanstoica89 Mar 11, 2021
11886d4
Fixed invalid JSON log
razvanstoica89 Mar 11, 2021
bf11d68
Add new check groups
razvanstoica89 Mar 11, 2021
ee5972c
Add new folders to improve code segmentation
razvanstoica89 Mar 16, 2021
2986d61
Ignore all. Whitelist only essential things.
razvanstoica89 Mar 16, 2021
b757aa7
Connection to the apk repositories is HTTPS by default
razvanstoica89 Mar 16, 2021
ca03a37
Remove duplicate Dockerfile
razvanstoica89 Mar 16, 2021
7144b94
Tests update
razvanstoica89 Mar 16, 2021
9722e5d
Move the help scripts to a dedicated folder
razvanstoica89 Mar 16, 2021
091b4b9
Add option to specify trusted users. Add option to disable the printi…
razvanstoica89 Mar 16, 2021
e5efe2b
Add explanations for newly added features
razvanstoica89 Mar 16, 2021
68bcd14
Increase version
razvanstoica89 Mar 17, 2021
7e89fdd
Add remediation stuff on host configuration
razvanstoica89 Mar 18, 2021
c05c586
Add remediation stuff on daemon configuration
razvanstoica89 Mar 18, 2021
25de0bd
Add remediation stuff on security operations
razvanstoica89 Mar 18, 2021
3a7fe3b
Add remediation stuff on swarm configuration
razvanstoica89 Mar 18, 2021
cc8171f
Add remediation stuff on enterprise configuration
razvanstoica89 Mar 18, 2021
68cb493
Log the remediation measure in JSON file only if the -p flag is not set
razvanstoica89 Mar 19, 2021
c8721c9
Displays the correct current time
razvanstoica89 Mar 19, 2021
f31e60c
Add more remediation stuff
razvanstoica89 Mar 22, 2021
4b68c2e
Rename logs without the .sh extension
razvanstoica89 Mar 27, 2021
8a934ae
Remove the Debian family-specific installation command
razvanstoica89 Mar 28, 2021
86985f8
Overwrite the json log at each run. Beautify the json log.
razvanstoica89 Mar 28, 2021
d0443cc
Bug fixing and improving source code readability
razvanstoica89 Mar 29, 2021
81ac358
Remove temporary files
razvanstoica89 Mar 29, 2021
c67469d
Fix systemctl error when running inside a container
razvanstoica89 Mar 29, 2021
38ac7ef
Fix the printing error when using bash
razvanstoica89 Apr 10, 2021
15aa1ee
Update remediation impact message for test 5.31
razvanstoica89 Apr 14, 2021
e4d9bd1
Set remediationImpact for 5.31 test to None.
razvanstoica89 Apr 14, 2021
0a59baa
Change "Impact" to "Remediation Impact" in bash log
razvanstoica89 Apr 19, 2021
6a8fdcf
Merge pull request #467 from razvanstoica89/master
konstruktoid Apr 27, 2021
addefc6
update documentation
konstruktoid May 25, 2021
cff5d7f
wording and set printremediation="0"
konstruktoid May 25, 2021
1702609
update check functions and remove docker_enterprise_configuration fro…
konstruktoid May 25, 2021
2466ab4
update wording
konstruktoid May 25, 2021
ca4ef8f
linting
konstruktoid May 25, 2021
4a4ae81
initial commit of tests/1_host_configuration.sh v1.3.1
konstruktoid May 25, 2021
6a68552
initial commit of tests/2_docker_daemon_configuration.sh v1.3.1
konstruktoid May 25, 2021
6f574b0
initial commit of tests/3_docker_daemon_configuration_files.sh v1.3.1
konstruktoid May 25, 2021
28fa039
initial commit of tests/4_container_images.sh v1.3.1
konstruktoid May 25, 2021
bd05445
initial commit of tests/5_container_runtime.sh v1.3.1
konstruktoid May 25, 2021
3a9deae
initial commit of tests/6_docker_security_operations.sh v1.3.1
konstruktoid May 25, 2021
4e379bb
initial commit of tests/7_docker_swarm_configuration.sh v1.3.1
konstruktoid May 25, 2021
32c5e5f
initial commit of tests/8_docker_enterprise_configuration.sh v1.3.1
konstruktoid May 25, 2021
c1457e6
initial commit of tests/99_community_checks.sh v1.3.1
konstruktoid May 25, 2021
3769a64
Merge pull request #469 from konstruktoid/v131
konstruktoid May 25, 2021
08a7b09
Update 2_docker_daemon_configuration.sh
aagot Jun 25, 2021
c625629
Merge pull request #471 from aagot/master
konstruktoid Jun 26, 2021
e31e7aa
fix: set docker-bench-security to sh
Jul 6, 2021
2024e16
Merge pull request #474 from denhamparry/master
konstruktoid Jul 7, 2021
dacc737
Implement listing of open ports
nikitastupin Jul 8, 2021
cf93e9e
Add checks for capabilities that allows container escape
nikitastupin Jul 8, 2021
683c5a9
fix socket check
konstruktoid Jul 12, 2021
dfb3a90
Merge pull request #478 from konstruktoid/ISSUE477
konstruktoid Jul 12, 2021
e6a742b
Added multiple check groups example
AErmie Sep 28, 2021
f656a5d
Merge pull request #485 from AErmie/patch-1
konstruktoid Sep 29, 2021
d98a054
Updated log file name
AErmie Sep 30, 2021
1891eaa
Merge pull request #487 from AErmie/patch-1
konstruktoid Sep 30, 2021
8ac4513
Add /etc/hostname fix for macOS
garettmd Oct 1, 2021
a40b888
Merge pull request #488 from garettmd/master
konstruktoid Oct 1, 2021
fd93a6e
Merge pull request #476 from nikitastupin/feature-specific-capability…
konstruktoid Oct 31, 2021
ec3ddf2
Merge pull request #475 from nikitastupin/feature-list-open-ports
konstruktoid Oct 31, 2021
7e89ea0
Fix typo in check_4_11
joaocfernandes Nov 11, 2021
a409e03
Fix typo in check_5_21
joaocfernandes Nov 11, 2021
ec211a3
Merge pull request #489 from joaocfernandes/fix_typos
konstruktoid Nov 12, 2021
0ae544d
fix style and false warning in check_5_3
SericaLaw Dec 1, 2021
3f3ff4f
Merge pull request #491 from SericaLaw/fix-check-5-3
konstruktoid Dec 1, 2021
0d58748
if the docker daemon is configure with no-new-privileges, pass check …
konstruktoid Dec 2, 2021
1ff4a62
Merge pull request #493 from konstruktoid/ISSUE492
konstruktoid Dec 16, 2021
5c7acd7
add note regarding docker image
konstruktoid Jan 6, 2022
d33139c
Merge pull request #494 from konstruktoid/imagenotice
konstruktoid Jan 6, 2022
975820f
Update alpine to 3.15
jammasterj89 Jan 11, 2022
715de9c
Merge pull request #495 from jammasterj89/master
konstruktoid Jan 11, 2022
68c8e53
add 4.12 check
konstruktoid Mar 7, 2022
d44c2a9
Merge pull request #496 from konstruktoid/artifactvalidation
konstruktoid Mar 7, 2022
3fe4081
ignore Vagrant files
konstruktoid Mar 7, 2022
3cfa505
update version information
konstruktoid Mar 7, 2022
cd1619c
Merge pull request #497 from konstruktoid/version
konstruktoid Mar 7, 2022
bb032f1
add github actions
konstruktoid Apr 30, 2022
58e732f
Merge pull request #499 from konstruktoid/action
konstruktoid Apr 30, 2022
d4c4538
add Vagrantfile
konstruktoid Apr 30, 2022
7c7390e
Merge pull request #500 from konstruktoid/vagrant
konstruktoid Apr 30, 2022
558fca3
grep host* in config file before testing 2.7
konstruktoid May 9, 2022
44fdceb
Merge pull request #501 from konstruktoid/issue498
konstruktoid May 23, 2022
b29f676
Fix sed commands for BSD sed
Jul 18, 2022
8ccd83a
Merge pull request #504 from gavinmporter/bsd-sed-fix
konstruktoid Jul 19, 2022
553c11f
Pin Docker image debian:sid
atomist-bot Oct 5, 2022
5a8d643
Merge pull request #506 from docker/atomist/pin-docker-base-image/dis…
konstruktoid Oct 5, 2022
ee718c4
Fix check_2_7 TLS check with json config
QuentinServais Dec 27, 2022
9415188
add support for .NanoCpus
konstruktoid Feb 2, 2023
75ccbc7
Merge pull request #508 from QuentinServais/fix/check_2_7_TLS
konstruktoid Feb 2, 2023
f375045
Merge pull request #511 from konstruktoid/issue510
konstruktoid Feb 2, 2023
cbd07bb
align tests to CIS Benchmark 1.5.0
konstruktoid Mar 6, 2023
ce38d3d
Merge pull request #513 from konstruktoid/150
konstruktoid Mar 6, 2023
e82fa2c
update version and add version table
konstruktoid Mar 6, 2023
dde48fc
Merge pull request #514 from konstruktoid/version150
konstruktoid Mar 6, 2023
316b610
update yell helper with correct version
konstruktoid Mar 6, 2023
41a44f5
Merge pull request #515 from konstruktoid/helper
konstruktoid Mar 6, 2023
faa0e88
slsa gha
konstruktoid Mar 13, 2023
956ca6b
update image
konstruktoid Mar 15, 2023
5a450fc
Merge pull request #516 from konstruktoid/rel
konstruktoid Mar 15, 2023
df36db7
update slsa gha
konstruktoid Mar 15, 2023
6dad6fc
Merge pull request #517 from konstruktoid/slsa
konstruktoid Mar 15, 2023
f16cd8d
update Issue assignment gha
konstruktoid Mar 15, 2023
949c6a0
fix version in readme
konstruktoid Mar 15, 2023
d0ccaca
Merge pull request #518 from konstruktoid/issuegha
konstruktoid Mar 15, 2023
93227bf
Merge pull request #519 from konstruktoid/readme
konstruktoid Mar 15, 2023
9bf4dea
update slsa gha permissions
konstruktoid Mar 15, 2023
16c2350
Merge pull request #520 from konstruktoid/gha
konstruktoid Mar 15, 2023
c8c90ee
checking for the MaxAttempts=5 too at service level
andreagalle Apr 12, 2023
f97b420
couple typos & performance improvements
andreagalle Apr 12, 2023
412f514
just a typo
andreagalle Apr 12, 2023
0dc2d2b
should fix the: Error response from daemon: This node is not a swarm …
andreagalle Apr 26, 2023
39963da
fix: allow get_docker_configuration_file_args to parse minified json
brsolomon-deloitte Jun 2, 2023
79407ce
remove non-universal tr -u flag
brsolomon-deloitte Jun 2, 2023
523556b
move HAVE_JQ into req_programs
brsolomon-deloitte Jun 2, 2023
1d29a1f
Merge pull request #525 from brsolomon-deloitte/bugfix/get_docker_con…
konstruktoid Jun 2, 2023
2647070
update Docker container instructions, remove out-of-date Dockerfiles
konstruktoid Jun 2, 2023
26dc83e
Merge pull request #526 from konstruktoid/docker
konstruktoid Jun 2, 2023
d6005f0
tr is required, not truncate
konstruktoid Jun 13, 2023
1f9933a
Merge pull request #528 from konstruktoid/issue527
konstruktoid Jun 13, 2023
bfbeda9
add label filtering config
lekpamartin Jul 1, 2023
d9f1d02
Merge pull request #522 from andreagalle/issue_521_restart_policy
konstruktoid Jul 7, 2023
223baf9
update doc
lekpamartin Jul 21, 2023
2dfb1ba
Update README.md
lekpamartin Jul 25, 2023
59fe573
update help
lekpamartin Jul 25, 2023
8ea9186
update doc
lekpamartin Jul 26, 2023
5555c37
Merge pull request #531 from lekpamartin/master
konstruktoid Jul 26, 2023
26f80fb
Fix image sprawl miscalculation
konstruktoid Aug 25, 2023
9120d42
Merge pull request #535 from konstruktoid/issue532
konstruktoid Aug 25, 2023
8da1cc2
v1.6.0
konstruktoid Aug 25, 2023
b7a5284
Merge pull request #536 from konstruktoid/v160
konstruktoid Aug 25, 2023
ab21908
check if restart policy is 5 or less
konstruktoid Sep 25, 2023
e680ab2
update restart_policy w/o swarm
konstruktoid Sep 25, 2023
5c647c1
"above" -> "below"
ismailarilik Oct 6, 2023
7287a35
Merge pull request #540 from ismailarilik/patch-1
konstruktoid Oct 6, 2023
b6e4380
fix537
halfluke Oct 21, 2023
8d97756
fix537_proper
halfluke Oct 21, 2023
4edccd7
Merge pull request #541 from halfluke/fix537
konstruktoid Oct 23, 2023
8bbdaf6
feat: use SHA instead of tags for base image
UlisesGascon Nov 19, 2023
0fd702a
Merge pull request #543 from UlisesGascon/fix/pin-dependency
konstruktoid Nov 19, 2023
958f5fa
feat: update swarm mode check id from 7.1 to 5.1
Dec 17, 2023
684512b
feat: check groups for CIS Controls v8 IG1-3 mapped recommendations
Dec 17, 2023
ba0b402
Merge pull request #546 from martipoe/master
konstruktoid Dec 20, 2023
820abe9
Merge pull request #539 from konstruktoid/issue538
konstruktoid Feb 11, 2024
e081393
include /run in get_service_file
konstruktoid Apr 11, 2024
287fd87
systemctl always returns an FragmentPath
konstruktoid Apr 12, 2024
5d5ca0a
correct tests and instructions
konstruktoid Apr 16, 2024
9669294
correct tests and instructions
konstruktoid Apr 16, 2024
12f085d
update SLSA action
konstruktoid Apr 16, 2024
c495b3a
Merge pull request #550 from konstruktoid/gha
konstruktoid Apr 16, 2024
2311026
Merge pull request #549 from konstruktoid/issue548
konstruktoid Apr 16, 2024
c4b7d36
modified get_docker_configuration_file_args jq command to remove \'nu…
spedersen-emailage May 15, 2024
5c42b8a
Merge pull request #553 from spedersen-emailage/log-level-fix
konstruktoid May 16, 2024
a18798f
dist: adjust script imports to be able to use /usr/libexec
cyphar Oct 18, 2024
ff26d67
Merge pull request #559 from cyphar/dist-libexec
konstruktoid Oct 21, 2024
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
7 changes: 6 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
.git
*
!docker-bench-security.sh
!functions/
!tests/
!log/
log/*
19 changes: 19 additions & 0 deletions .github/workflows/issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Issue assignment

on:
issues:
types: [opened]

permissions:
contents: read

jobs:
auto-assign:
permissions:
issues: write
runs-on: ubuntu-latest
steps:
- name: 'auto-assign issue'
uses: pozil/auto-assign-issue@74b9f64cc1a08f99358061073e243a4c3d7dd5c4 # v1.11.0
with:
assignees: konstruktoid
80 changes: 80 additions & 0 deletions .github/workflows/slsa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
name: SLSA
on:
push:
release:
permissions:
contents: write
types: [published, released]

permissions:
contents: read

jobs:
build:
outputs:
hashes: ${{ steps.hash.outputs.hashes }}
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- run: echo "REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV
shell: bash

- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Build artifacts
run: |
find *.sh functions/* tests/* Dockerfile Vagrantfile -exec sha256sum {} \; > ${{ env.REPOSITORY_NAME }}.sha256

- name: Generate hashes
shell: bash
id: hash
run: |
echo "hashes=$(sha256sum ${{ env.REPOSITORY_NAME }}.sha256 | base64 -w0)" >> "$GITHUB_OUTPUT"

- name: Upload ${{ env.REPOSITORY_NAME }}.sha256
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: ${{ env.REPOSITORY_NAME }}.sha256
path: ${{ env.REPOSITORY_NAME }}.sha256
if-no-files-found: error
retention-days: 5

provenance:
needs: [build]
permissions:
actions: read
id-token: write
contents: write
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
with:
base64-subjects: "${{ needs.build.outputs.hashes }}"
upload-assets: ${{ startsWith(github.ref, 'refs/tags/') }}

release:
permissions:
actions: read
id-token: write
contents: write
needs: [build, provenance]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- run: echo "REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV
shell: bash

- name: Download ${{ env.REPOSITORY_NAME }}.sha256
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: ${{ env.REPOSITORY_NAME }}.sha256

- name: Upload asset
uses: softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564 # v2.0.4
with:
files: |
${{ env.REPOSITORY_NAME }}.sha256
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.log
log/*
*.swp*
.vagrant/
47 changes: 27 additions & 20 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,56 @@
Want to hack on Docker Bench? Awesome! Here are instructions to get you
started.

The Docker Bench for Security is a part of the [Docker](https://www.docker.com) project, and follows
the same rules and principles. If you're already familiar with the way
Docker does things, you'll feel right at home.
The Docker Bench for Security is a part of the [Docker](https://www.docker.com)
project, and follows the same rules and principles. If you're already familiar
with the way Docker does things, you'll feel right at home.

Otherwise, go read
[Docker's contributions guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md).
[Contribute to the Moby Project](https://github.com/moby/moby/blob/master/CONTRIBUTING.md).

### Development Environment Setup
## Development Environment Setup

The only thing you need to hack on Docker Bench for Security is a POSIX 2004 compliant shell. We try to keep the project compliant for maximum portability

#### Start hacking
### Start hacking

You can build the container that wraps the docker-bench for security:

```sh
git clone [email protected]:docker/docker-bench-security.git
cd docker-bench-security
docker build -t docker-bench-security .
git clone [email protected]:docker/docker-bench-security.git
cd docker-bench-security
docker build -t docker-bench-security .
```

Or you can simply run the shell script locally:

```sh
git clone [email protected]:docker/docker-bench-security.git
cd docker-bench-security
sh docker-bench-security.sh
git clone [email protected]:docker/docker-bench-security.git
cd docker-bench-security
sudo sh docker-bench-security.sh
```

The Docker Bench has the main script called `docker-bench-security.sh`. This is the main script that checks for all the dependencies, deals with command line arguments and loads all the tests.
The Docker Bench has the main script called `docker-bench-security.sh`.
This is the main script that checks for all the dependencies, deals with
command line arguments and loads all the tests.

The tests are split in 6 different files:
The tests are split into the following files:

```sh
✗ tree tests/
tests/
├── 1_host_configuration.sh
├── 2_docker_daemon_configuration.sh
├── 3_docker_daemon_configuration_files.sh
├── 4_container_images.sh
├── 5_container_runtime.sh
└── 6_docker_security_operations.sh
├── 6_docker_security_operations.sh
├── 7_docker_swarm_configuration.sh
├── 8_docker_enterprise_configuration.sh
└── 99_community_checks.sh
```

To modify the Docker Bench for Security you should first clone the repository, make your changes, check your code with `shellcheck`, `checkbashisms` or similar tools, and then sign off on your commits. After that feel free to send us a pull-request with the changes.
To modify the Docker Bench for Security you should first clone the repository,
make your changes, check your code with `shellcheck`, or similar tools, and
then sign off on your commits. After that feel free to send us a pull request
with the changes.

While this tool is inspired in the CIS Docker 1.6 Benchmark, feel free to add new tests. We will try to turn dockerbench.com into a list of good community benchmarks for both security and performance, and we would love community contributions.
While this tool was inspired by the [CIS Docker 1.11.0 benchmark](https://www.cisecurity.org/benchmark/docker/)
and its successors, feel free to add new tests.
58 changes: 58 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
The following people, listed in alphabetical order, have contributed to docker-bench-security:

* alberto <[email protected]>
* Andreas Stieger <[email protected]>
* Anthony Roger <[email protected]>
* Aurélien Gasser <[email protected]>
* binary <[email protected]>
* Boris Gorbylev <[email protected]>
* Cheng-Li Jerry Ma <[email protected]>
* Csaba Palfi <[email protected]>
* Daniele Marcocci <[email protected]>
* Dhawal Patel <[email protected]>
* Diogo Monica <[email protected]>
* Diogo Mónica <[email protected]>
* Ernst de Haan <[email protected]>
* HuKeping <[email protected]>
* Ivan Angelov <[email protected]>
* J0WI <[email protected]>
* jammasterj89 <[email protected]>
* Jessica Frazelle <[email protected]>
* Joachim Lusiardi <[email protected]>
* Joachim Lusiardi <[email protected]>
* Joachim Lusiardi <[email protected]>
* Joe Williams <[email protected]>
* Julien Garcia Gonzalez <[email protected]>
* Jürgen Hermann <[email protected]>
* kakakakakku <[email protected]>
* Karol Babioch <[email protected]>
* Kevin Lim <[email protected]>
* kevinll <[email protected]>
* Liron Levin <[email protected]>
* liron-l <[email protected]>
* LorensK <[email protected]>
* lusitania <[email protected]>
* Maik Ellerbrock <[email protected]>
* Mark Stemm <[email protected]>
* Matt Fellows <[email protected]>
* Michael Crosby <[email protected]>
* Michael Stahn <[email protected]>
* Mike Ritter <[email protected]>
* Mr. Secure <[email protected]>
* MrSecure <[email protected]>
* Nigel Brown <[email protected]>
* Paul Czarkowski <[email protected]>
* Paul Morgan <[email protected]>
* Pete Sellars <[email protected]>
* Peter <[email protected]>
* Ravi Kumar Vadapalli <[email protected]>
* Scott McCarty <[email protected]>
* Sebastiaan van Stijn <[email protected]>
* telepresencebot2 <[email protected]>
* Thomas Sjögren <[email protected]>
* Tom Partington <[email protected]>
* Werner Buck <[email protected]>
* will Farrell <[email protected]>
* Zvi "Viz" Effron <[email protected]>

This list was generated Tue Nov 5 09:45:35 UTC 2019.
36 changes: 14 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
# REPOSITORY https://github.com/docker/docker-bench-security
FROM alpine:3.18@sha256:eece025e432126ce23f223450a0326fbebde39cdf496a85d8c016293fc851978

FROM alpine:3.2
LABEL \
org.label-schema.name="docker-bench-security" \
org.label-schema.url="https://dockerbench.com" \
org.label-schema.vcs-url="https://github.com/docker/docker-bench-security.git"

ENV VERSION 1.9.1
RUN apk add --no-cache iproute2 \
docker-cli \
dumb-init \
jq

MAINTAINER dockerbench.com
COPY . /usr/local/bin/

WORKDIR /usr/bin
HEALTHCHECK CMD exit 0

RUN apk update && \
apk upgrade && \
apk --update add curl && \
curl -sS https://get.docker.com/builds/Linux/x86_64/docker-$VERSION > docker-$VERSION && \
curl -sS https://get.docker.com/builds/Linux/x86_64/docker-$VERSION.sha256 > docker-$VERSION.sha256 && \
sha256sum -c docker-$VERSION.sha256 && \
ln -s docker-$VERSION docker && \
chmod u+x docker-$VERSION && \
apk del curl && \
rm -rf /var/cache/apk/*
WORKDIR /usr/local/bin

RUN mkdir /docker-bench-security

COPY . /docker-bench-security

WORKDIR /docker-bench-security

ENTRYPOINT ["/bin/sh", "docker-bench-security.sh"]
ENTRYPOINT [ "/usr/bin/dumb-init", "/bin/sh", "docker-bench-security.sh" ]
CMD [""]
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@

[people.konstruktoid]
Name = "Thomas Sjögren"
Email = "thomas.sjogren@outlook.com"
Email = "thomas.sjogren@protonmail.com"
GitHub = "konstruktoid"
Loading