A tool for performing static analysis using STIGs
Project description
Anchore STIG
Anchore STIG is a complete STIG solution that can be used to run STIG profile against static images.
Description
Use Anchore STIG to perform STIG checks against running containers in Kubernetes environments or static Docker images from a registry or stored locally. The tool executes automated scans against specific STIG Security Guide (SSG) policies. The program will output either a JSON report with a summary of STIG check results for runtime checks or XCCDF XML and OpenSCAP XML and HTML for static checks.
The static functionality includes the following profiles:
- Ubuntu 20.04 (ubuntu2004)
- Ubuntu 22.04 (ubuntu2204)
- Ubuntu 24.04 (ubuntu2404)
- Universal Base Image 8 (ubi8) - This runs the full RHEL 8 STIG
- Universal Base Image 9 (ubi9) - This runs the full RHEL 9 STIG
- Postgres 9 (postgres9)
- Apache Tommcat 9 (apache-tomcat9)
- Crunchy PostgreSQL (crunchy-postgresql)
- JBOSS (jboss)
- Java Runtime Environment 7 (jre7)
- MongoDB Enterprise (mongodb)
- nginx (nginx)
Getting Started
Dependencies
Overall
python3 >= 3.8 with pip installedsafCINC Auditor- There is an option to install this tool after running the tool, but installing it manually is the most reliable.
Static
docker- the Docker daemon must be running. If the target images are located in a private registry, you can be logged in to pull those images or pass credentials to the registry while using the tool.
Install
- Run
pip install anchorestig-static
Install Dependencies
Anchore STIG requires, at a bare minimum, CINC auditor and SAF cli to function properly. For Runtime to function, the k8s plugin for CINC auditor must be installed as well. Anchore STIG has a function to assist with installing all of these tools. Below are the instructions for installing each of these.
- CINC auditor can be installed by running
anchorestig provision --installoranchorestig provision --install --privilegedfor systems that require root. It also can be installed manually by runningcurl -L https://omnitruck.cinc.sh/install.sh | bash -s -- -P cinc-auditor -v 5.22.50orcurl -L https://omnitruck.cinc.sh/install.sh | sudo bash -s -- -P cinc-auditor -v 5.22.50for systems that require root. - The SAF cli can be installed in a few ways. When running static STIG like
anchorestig static TARGET_IMAGEwithout saf installed, an interactive message will pop up to help install the tool. To install it manually, please follow the instructions here to install it with either npm or homebrew. Please note that it must be installed locally. Using the Docker functionality will not work with Anchore STIG.
Running the Program
Static
- Run the tool using
anchorestig static IMAGE.- Ex:
anchorestig static docker.io/ubi8:latest - NOTE: please note that the first run will require ingesting the profile provided by the Anchore team. This can be accomplished with the
-tflag pointed at the tarred policy file. Ex.anchorestig static redhat/ubi8:latest -t ./policies.tar.gz
- Ex:
Options:
-u, --username TEXT Username for private registry
-p, --password TEXT Password for private registry
-r, --url TEXT URL for private registry
-b, --aws-bucket TEXT S3 upload. Specify bucket name
-a, --account TEXT Anchore STIG UI account. Required for S3 upload
-s, --insecure Allow insecure registries or registries with
custom certs
-l, --profile TEXT Specify profile to run. Can be the name of an
existing profile or the path to a custom profile
-i, --input-file TEXT Specify the path to a custom input file to run
with a profile.
-y, --sync Sync policies from Anchore
-t, --sync-from-file TEXT Sync policies from tar file provided by Anchore.
Provide the path to the tar file.
--help Show this message and exit.
Viewing Results
Navigate to the ./stig-results directory. The output directory containing output files will be named according to the image scanned.
Help
Use the --help flag to see more information on how to run the program:
anchorestig --help
Authors
- Sean Fazenbaker @bakenfazer
- Michael Simmons @MSimmons7
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file anchorestig_static-0.75.5.tar.gz.
File metadata
- Download URL: anchorestig_static-0.75.5.tar.gz
- Upload date:
- Size: 24.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25fa425c3229ece394b142d495243c86c996c1e7b7c494aec777752a8eb7019b
|
|
| MD5 |
2b3f7603e5bbeaacda237e401528c2a2
|
|
| BLAKE2b-256 |
bcf9dfcf88875664e200c48fc0e55bd176438940d75ac75171876f9c7c2a7db2
|
Provenance
The following attestation bundles were made for anchorestig_static-0.75.5.tar.gz:
Publisher:
release.yml on anchore/Anchore-Static-STIG-Only
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anchorestig_static-0.75.5.tar.gz -
Subject digest:
25fa425c3229ece394b142d495243c86c996c1e7b7c494aec777752a8eb7019b - Sigstore transparency entry: 202263060
- Sigstore integration time:
-
Permalink:
anchore/Anchore-Static-STIG-Only@0f095bc0451d51529de68e06e9c91947421cf39b -
Branch / Tag:
refs/tags/v0.75.5 - Owner: https://github.com/anchore
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0f095bc0451d51529de68e06e9c91947421cf39b -
Trigger Event:
push
-
Statement type:
File details
Details for the file anchorestig_static-0.75.5-py3-none-any.whl.
File metadata
- Download URL: anchorestig_static-0.75.5-py3-none-any.whl
- Upload date:
- Size: 35.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d5ca8618a053934a1a85dc36eedbd622e259be8b761db3c65505ada2587e6e4
|
|
| MD5 |
4762bf44f5c2254383b2c00fc7778777
|
|
| BLAKE2b-256 |
74cf78fa4d55dd572826f6ed1e9b836e00d852f1350130630db3afa88bd6cfd5
|
Provenance
The following attestation bundles were made for anchorestig_static-0.75.5-py3-none-any.whl:
Publisher:
release.yml on anchore/Anchore-Static-STIG-Only
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anchorestig_static-0.75.5-py3-none-any.whl -
Subject digest:
8d5ca8618a053934a1a85dc36eedbd622e259be8b761db3c65505ada2587e6e4 - Sigstore transparency entry: 202263062
- Sigstore integration time:
-
Permalink:
anchore/Anchore-Static-STIG-Only@0f095bc0451d51529de68e06e9c91947421cf39b -
Branch / Tag:
refs/tags/v0.75.5 - Owner: https://github.com/anchore
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0f095bc0451d51529de68e06e9c91947421cf39b -
Trigger Event:
push
-
Statement type: