Applying Initiatives to your SDLC
You can use Scribe to apply policies at different points along your SDLC. For example, at the end of a build or at the admission control point to the production cluster. Use cases include:
- Images must be signed, and they must have a matching CycloneDX SBOM.
- Images must be built by a CircleCI workflow and produce signed SLSA provenance.
- Tagged sources must be signed and verified by a set of individuals or processes.
For a detailed initiative description, see the initiatives section.
Quickstart
Creating an SBOM
-
Install
valint
:curl -sSfL https://get.scribesecurity.com/install.sh | sh -s -- -t valint
-
Create an SBOM of the type you want to verify. For a Docker image, the command would be:
valint bom busybox:latest -o attest \
--product-key <PRODUCT_KEY> -- product-version <PRODUCT_VERSION> \
--scribe.client-secret <SCRIBE_TOKEN>
See Getting started with valint for more information on the bom
command.
Alternatively, you can use GitHub actions, as described in detail in Setting up an integration in GitHub.
Verifying an initiative
-
Create an image SBOM as described in Creating an SBOM.
-
Verify the SBOM against an initiative. Let's take the SSDF initiative provided in the Scribe Sample Catalog:
valint verify busybox:latest --initiative ssdf@v2 \
--product-key <PRODUCT_KEY> -- product-version <PRODUCT_VERSION> \
--scribe.client-secret <SCRIBE_TOKEN>As a result, you will see the output table of the initiative verification. A detailed description of the fields is provided in the corresponding section of the Policy Results page.
Initiative results
INFO PS/PS.2/PS.2.1: Control "Make software integrity verification information available to software acquirers" Evaluation Summary:
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ [PS/PS.2/PS.2.1] Control "Make software integrity verification information available to software acquirers" Evaluati │
│ on Summary │
├────────────────┬──────────────────┬───────┬──────────┬────────┬─────────────────────────────┬────────────────────────┤
│ RULE ID │ RULE NAME │ LEVEL │ VERIFIED │ RESULT │ SUMMARY │ TARGET │
├────────────────┼──────────── ──────┼───────┼──────────┼────────┼─────────────────────────────┼────────────────────────┤
│ sbom-is-signed │ Image-verifiable │ none │ true │ pass │ Evidence signature verified │ busybox:1.36.1 (image) │
├────────────────┼──────────────────┼───────┼──────────┼────────┼─────────────────────────────┼────────────────────────┤
│ CONTROL RESULT │ │ │ │ PASS │ │ │
└────────────────┴──────────────────┴───────┴──────────┴────────┴─────────────────────────────┴────────────────────────┘
INFO PS/PS.3/PS.3.1: Control "Securely archive the necessary files and supporting data to be retained for each software release" Evaluation Summary:
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ [PS/PS.3/PS.3.1] Control "Securely archive the necessary files and supporting data to be retained for each software │
│ release" Evaluation Summary │
├───────────────────┬───────────────────┬───────┬──────────┬────────┬─────────────────────────┬────────────────────────┤
│ RULE ID │ RULE NAME │ LEVEL │ VERIFIED │ RESULT │ SUMMARY │ TARGET │
├───────────────────┼───────────────────┼───────┼──────────┼────────┼─────────────────────────┼────────────────────────┤
│ provenance-exists │ Provenance exists │ error │ false │ fail │ SLSA Provenance missing │ busybox:1.36.1 (image) │
├───────────────────┼───────────────────┼───────┼──────────┼────────┼─────────────────────────┼────────────────────────┤
│ CONTROL RESULT │ │ │ │ FAIL │ │ │
└───────────────────┴───────────────────┴───────┴──────────┴────────┴─────────────────────────┴────────────────────────┘
INFO PS/PS.3/PS.3.2: Control "Collect, safeguard, maintain, and share provenance data for all components of each software release" Evaluation Summary:
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ [PS/PS.3/PS.3.2] Control "Collect, safeguard, maintain, and share provenance data for all components of each soft │
│ ware release" Evaluation Summary │
├────────────────┬───────────────┬───────┬──────────┬────────┬─────────────────────────────┬────────────────────────┤
│ RULE ID │ RULE NAME │ LEVEL │ VERIFIED │ RESULT │ SUMMARY │ TARGET │
├────────────────┼───────────────┼───────┼──────────┼────────┼─────────────────────────────┼────────────────────────┤
│ sbom-is-signed │ SBOM archived │ none │ true │ pass │ Evidence signature verified │ busybox:1.36.1 (image) │
├────────────────┼───────────────┼───────┼──────────┼────────┼─────────────────────────────┼────────────────────────┤
│ CONTROL RESULT │ │ │ │ PASS │ │ │
└────────────────┴───────────────┴───────┴──────────┴────────┴─────────────────────────────┴────────────────────────┘
INFO SSDF: Initiative "SSDF Client Initiative" Evaluation Summary:
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ [SSDF] Initiative "SSDF Client Initiative" Evaluation Summary │
├───────────────────┬──────────────────────────────────────────────────────────────────┬────────────────────────────┬────────┤
│ CONTROL ID │ CONTROL NAME │ RULE LIST │ RESULT │
├───────────────────┼──────────────────────────────────────────────────────────────────┼────────────────────────────┼────────┤
│ PS/PS.2/PS.2.1 │ Make software integrity verification information available to so │ - Image-verifiable (pass) │ pass │
│ │ ftware acquirers │ │ │
├───────────────────┼──────────────────────────────────────────────────────────────────┼────────────────────────────┼────────┤
│ PS/PS.3/PS.3.1 │ Securely archive the necessary files and supporting data to be r │ - Provenance exists (fail) │ fail │
│ │ etained for each software release │ │ │
├───────────────────┼──────────────────────────────────────────────────────────────────┼────────────────────────────┼────────┤
│ PS/PS.3/PS.3.2 │ Collect, safeguard, maintain, and share provenance data for all │ - SBOM archived (pass) │ pass │
│ │ components of each software release │ │ │
├───────────────────┼──────────────────────────────────────────────────────────────────┼────────────────────────────┼────────┤
│ INITIATIVE RESULT │ │ │ FAIL │
└───────────────────┴──────────────────────────────────────────────────────────────────┴────────────────────────────┴ ────────┘
Evaluation Target Name 'index.docker.io/library/busybox:latest'infoOnly the rules that are applicable to the target (the
busybox:latest
docker image) were verified. Other rules were disabled automatically, and no result was generated for them.infoTo verify the whole SSDF initiative, you need to run SCM platform discovery. See platforms discovery.
Running a single rule verification
Similar to initiatives, you can verify a single rule. Let's take as an example the sbom-require-complete-license-set
rule from the Scribe Sample Catalog:
-
Create an image SBOM as described in Creating an SBOM.
-
Verify the SBOM against an existing rule from the bundle. The Scribe Sample Rule Catalog will be used as the default rule bundle for
valint
.valint verify busybox:latest --rule sbom/complete-licenses@v2 \
--product-key <PRODUCT_KEY> -- product-version <PRODUCT_VERSION> \
--scribe.client-secret <SCRIBE_TOKEN>As a result, you will see the output table of the rule verification. A detailed description of the fields is provided in the corresponding section of the Policy Results page.
Rule evaluation results
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ [default] Control "Default" Evaluation Summary │
├───────────────────────────────── ──┬───────────────────────────────────┬───────┬──────────┬────────┬────────────────────────────┬────────────────────────┤
│ RULE ID │ RULE NAME │ LEVEL │ VERIFIED │ RESULT │ SUMMARY │ TARGET │
├───────────────────────────────────┼───────────────────────────────────┼───────┼──────────┼────────┼────────────────────────────┼────────────────────────┤
│ sbom-require-complete-license-set │ Enforce SBOM License Completeness │ error │ false │ pass │ All packages have licenses │ busybox:1.36.1 (image) │
├───────────────────────────────────┼───────────────────────────────────┼───────┼──────────┼────────┼────────────────────────────┼────────────────────────┤
│ CONTROL RESULT │ │ │ │ PASS │ │ │
└───────────────────────────────────┴───────────────────────────────────┴───────┴──────────┴────────┴────────────────────────────┴────────────────────────┘You will also see the results table of the initiative evaluation:
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
│ [client-initiative] Initiative "client-initiative" Evaluation Summary │
├───────────────────┬───────────────┬────────────────────────────────────────────────┬────────┤
│ CONTROL ID │ CONTROL NAME │ RULE LIST │ RESULT │
├───────────────────┼───────────────┼────────────────────────────────────────────────┼────────┤
│ default │ Default │ sbom-require-complete-license-set(pass) │ pass │
├───────────────────┼───────────────┼────────────────────────────────────────────────┼────────┤
│ INITIATIVE RESULT │ │ │ PASS │
└───────────────────┴───────────────┴────────────────────────────────────────────────┴────────┘infoThe rule was put in the
client-initiative
initiative. To change that, you can use the--initiative-name
and--initiative-id
flags. It was also put in thedefault
control. This cannot be changed unless you provide a full initiative config with custom names and IDs for your controls.
Targetless Run
Some of the rules in this catalog can also be run in "targetless" mode, meaning that the evidence will be looked up based only on the product name, version, and options specified in the rule config. No target for preliminary analysis is needed. This is usually helpful for third-party reports, such as security scans and platform discoveries.
As an example, let's run trivy
to create a SARIF report:
trivy image --format sarif --output results.sarif ubuntu:latest
Then, create evidence from this report:
valint evidence results.sarif \
--product-key <PRODUCT_KEY> -- product-version <PRODUCT_VERSION> \
--scribe.client-secret <SCRIBE_TOKEN>
Finally, verify the evidence against the rule. Note that we don't need to provide valint
with the target report:
valint verify --rule sarif/trivy/verify-trivy-report@v2 \
--product-key <PRODUCT_KEY> -- product-version <PRODUCT_VERSION> \
--scribe.client-secret <SCRIBE_TOKEN>
valint
will use the latest evidence for the specified product name and version that meets the other rule requirements.
In our example, the rule needs an evidence created by the "Trivy Vulnerability Scanner" tool,
so valint
was able to find it just by this partial context.
Initiative results
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ [default] Control "Default" Evaluation Summary │
├────────────────┬──────────────────────────────────────┬───────┬──────────┬────────┬────────────────────────────────┬───────────────┤
│ RULE ID │ RULE NAME │ LEVEL │ VERIFIED │ RESULT │ SUMMARY │ TARGET │
├────────────────┼──────────────────────────────────────┼───────┼──────────┼────────┼────────────────────────────────┼───────────────┤
│ trivy-report │ Verify Trivy SARIF Report Compliance │ error │ false │ fail │ 113 violations | 0 max allowed │ results.sarif │
├────────────────┼──────────────────────────────────────┼───────┼──────────┼────────┼────────────────────────────────┼───────────────┤
│ CONTROL RESULT │ │ │ │ FAIL │ │ │
└────────────────┴──────────────────────────────────────┴───────┴──────────┴────────┴────────────────────────────────┴───────────────┘
┌────────────────────────────────────────────────────────────────────────┐
│ [client-initiative] Initiative "client-initiative" Evaluation Summary │
├───────────────────┬───────────────┬───────────────────────────┬────────┤
│ CONTROL ID │ CONTROL NAME │ RULE LIST │ RESULT │
├───────────────────┼───────────────┼───────────────────────────┼────────┤
│ default │ Default │ trivy-report(fail) │ fail │
├───────────────────┼───────────────┼───────────────────────────┼────────┤
│ INITIATIVE RESULT │ │ │ FAIL │
└───────────────────┴───────────────┴───────────────────────────┴────────┘
Whole initiative verification
If you want to verify an initiative on all existing attestations, provide valint
with the --all-evidence
flag.
It disables using of target for evidence filtering and verifies all matching attestations for each rule.
valint verify --initiative ssdf@v2 --all-evidence \
--product-key <PRODUCT_KEY> -- product-version <PRODUCT_VERSION> \
--scribe.client-secret <SCRIBE_TOKEN>
Initiative results
INFO PS/PS.3/PS.3.1: Control "Securely archive the necessary files and supporting data to be retained for each software release" Evaluation Summary:
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ [PS/PS.3/PS.3.1] Control "Securely archive the necessary files and supporting data to be retained for each software │
│ release" Evaluation Summary │
├───────────────────┬───────────────────┬───────┬──────────┬────────┬─────────────────────────┬────────────────────────┤
│ RULE ID │ RULE NAME │ LEVEL │ VERIFIED │ RESULT │ SUMMARY │ TARGET │
├───────────────────┼───────────────────┼───────┼──────────┼────────┼─────────────────────────┼───────────── ───────────┤
│ provenance-exists │ Provenance exists │ error │ false │ fail │ SLSA Provenance missing │ busybox:1.36.1 (image) │
├───────────────────┼───────────────────┼───────┼──────────┼────────┼─────────────────────────┼────────────────────────┤
│ CONTROL RESULT │ │ │ │ FAIL │ │ │
└───────────────────┴───────────────────┴───────┴──────────┴────────┴─────────────────────────┴────────────────────────┘
INFO PS/PS.3/PS.3.2: Control "Collect, safeguard, maintain, and share provenance data for all components of each software release" Evaluation Summary:
┌───────────────────────────────────────────────────────────────────────────────────────────────────── ──────────────┐
│ [PS/PS.3/PS.3.2] Control "Collect, safeguard, maintain, and share provenance data for all components of each soft │
│ ware release" Evaluation Summary │
├────────────────┬───────────────┬───────┬──────────┬────────┬─────────────────────────────┬────────────────────────┤
│ RULE ID │ RULE NAME │ LEVEL │ VERIFIED │ RESULT │ SUMMARY │ TARGET │
├────────────────┼───────────────┼───────┼──────────┼────────┼─────────────────────────────┼────────────────────────┤
│ sbom-is-signed │ SBOM archived │ none │ true │ pass │ Evidence signature verified │ busybox:1.36.1 (image) │
├────────────────┼───────────────┼───────┼──── ──────┼────────┼─────────────────────────────┼────────────────────────┤
│ CONTROL RESULT │ │ │ │ PASS │ │ │
└────────────────┴───────────────┴───────┴──────────┴────────┴─────────────────────────────┴────────────────────────┘
INFO PS/PS.1/PS.1.1: Control "Store all forms of code based on the principle of least privilege" Evaluation Summary:
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ [PS/PS.1/PS.1.1] Control "Store all forms of code based on the principle of least privilege" Evaluation Summary │