Reviewing package decisions and evidence
AWS Continuum for software supply chain is in preview release and is subject to change.
Use the decision commands in the AWS Command Line Interface (AWS CLI) when you build a custom integration or
audit past decisions. Most customers get decisions by running package installs through the Continuum for software supply chain
CLI. For that walkthrough, see Getting started with Continuum for software supply chain. In each AWS CLI command, replace region with an AWS Region where Continuum for software supply chain is available, such as us-east-1. For the Regions, see
Regions and endpoints.
The Continuum for software supply chain decision commands are create-package-decision,
get-package-decision, list-package-decisions,
list-decision-evidence, and get-vulnerability. They call the
CreatePackageDecision, GetPackageDecision,
ListPackageDecisions, ListDecisionEvidence, and
GetVulnerability operations. If you build your own client instead of using the
AWS CLI, see Regions and endpoints.
Each of the five decision actions supports only * as the resource. For the
actions and example policies, see Supply chain actions. CloudTrail records these
five operations as data events when you turn on data event logging for the decision resource types
in your trail. For more information, see Logging AWS Continuum API calls using AWS CloudTrail.
This topic describes the operations and their main fields. For the full request and response parameters, see the AWS Continuum API Reference.
Requesting a decision
You request a decision for a package with the create-package-decision command.
Use this command when you build a custom integration that checks a package before it
installs.
Request and response
To request a decision, pass the package URL (purl) that you want a decision for. For how Continuum for software supply chain identifies a package in a purl, see Package URLs.
The output holds the decision ID, the accepted purl in canonicalPurl, and the
four decision fields evaluatedAction, enforcementAction,
enforcementMode, and reason. No evidence comes back in this output. To
read the evidence, use list-decision-evidence. The following example gets an allow
decision for a package that no rule matches:
PROMPT>aws continuum create-package-decision \ --regionregion\ --purl pkg:npm/lodash@4.17.21 { "decisionId": "decision-id", "canonicalPurl": "pkg:npm/lodash@4.17.21", "evaluatedAction": "ALLOW", "enforcementAction": "ALLOW", "enforcementMode": "NONE", "reason": "NO_DENY_MATCH" }
If you receive errors when you run AWS CLI commands, see Troubleshooting errors for the AWS CLI in the AWS CLI User Guide. Also, make sure that you're using the most recent AWS CLI version.
Your client acts on the enforcementAction field. For what each field and reason
means, see Decision fields and reasons.
Idempotency token
The AWS CLI and the generated AWS SDKs fill in the idempotency token for each
create-package-decision command, so you don't supply one. If you build your own
client, a request with no token, or with a token that doesn't match the request, returns a
ValidationException. For the token format, see the AWS Continuum API Reference.
Viewing decisions
You read a single decision with get-package-decision and list the decisions in
your account with list-package-decisions.
Get a decision
To read a decision again later, pass its decision ID. The output holds the same fields as the decision, plus the evaluatedAt and
completedAt times:
PROMPT>aws continuum get-package-decision \ --regionregion\ --decision-iddecision-id{ "decisionId": "decision-id", "canonicalPurl": "pkg:npm/lodash@4.17.21", "evaluatedAction": "ALLOW", "enforcementAction": "ALLOW", "enforcementMode": "NONE", "reason": "NO_DENY_MATCH", "evaluatedAt": "timestamp", "completedAt": "timestamp" }
A decision is immutable, and Continuum for software supply chain never re-evaluates
it. If the decision ID is unknown, expired, or belongs to another account, Continuum for software supply chain
returns a ResourceNotFoundException.
List decisions
To list the decisions in your account, run the following command:
PROMPT>aws continuum list-package-decisions --regionregion{ "decisions": [ { "decisionId": "decision-id", "evaluatedAt": "timestamp", "completedAt": "timestamp", "canonicalPurl": "pkg:npm/lodash@4.17.21", "evaluatedAction": "ALLOW", "enforcementAction": "ALLOW", "enforcementMode": "NONE", "reason": "NO_DENY_MATCH" }, ... ] }
Each entry in the output holds the same fields as a decision from
get-package-decision. Continuum for software supply chain returns the decisions newest first by
completedAt. To narrow the results by time, use the
--completed-after and --completed-before options:
PROMPT>aws continuum list-package-decisions \ --regionregion\ --completed-aftertimestamp\ --completed-beforetimestamp
The AWS CLI pages through the results automatically. To control paging, use the
--max-items and --starting-token options.
Retention
Continuum for software supply chain stores each package decision for 45 days. After that time,
get-package-decision returns a ResourceNotFoundException for the
decision, and list-package-decisions no longer returns it. For more information about
the data that Continuum for software supply chain stores, see Data that Continuum for software supply chain stores.
Reading evidence
To read the evidence behind a decision, pass its decision ID to the
list-decision-evidence command. The following output shows one policyRuleMatch evidence item:
PROMPT>aws continuum list-decision-evidence \ --regionregion\ --decision-iddecision-id{ "evidence": [ { "policyRuleMatch": { "policyArn": "policy-arn", "ruleId": "rule-id", "enforcementMode": "ENFORCE" } } ] }
If the decision ID is unknown, expired, or belongs to another account, Continuum for software supply chain
returns a ResourceNotFoundException. Continuum for software supply chain records evidence at decision
time and never re-evaluates it. The output holds one or more evidence items. Each item is one of
the following three types.
Baseline evidence
The mandatoryBaseline evidence type records a match from the malicious-package
baseline. It holds the following fields:
baselineArn-
The ARN of the malicious-package baseline. It is a managed policy ARN in the following form, with your partition, AWS Region, and account ID:
arn:partition:continuum:region:account:supply-chain-managed-policy/malicious vulnerabilityIds-
An optional list of vulnerability IDs related to the match. This list doesn't tell you which ID caused the malicious verdict. To read the metadata for an ID, pass it to
get-vulnerability.
The following example shows mandatoryBaseline evidence. Replace the partition,
AWS Region, and account placeholders with your values:
{ "mandatoryBaseline": { "baselineArn": "arn:partition:continuum:region:account:supply-chain-managed-policy/malicious" } }
Policy rule match
The policyRuleMatch evidence type records a match from a rule in one of your
policies. It holds the following fields:
policyArn-
The ARN of the policy that matched.
ruleId-
The ID of the rule that matched.
enforcementMode-
The rule's mode at the time of evaluation, either
AUDITorENFORCE.
When the only unsuppressed match is an AUDIT rule, the decision's reason is
POLICY_RULE_MATCHED, the evaluated action is DENY, and the enforcement
action is ALLOW. For more information, see Decision fields and reasons.
Policy exception
The policyException evidence type records a policy exception that suppressed one
or more matching rules. It holds the following fields:
exceptionArn-
The ARN of the policy exception.
policyArn-
The ARN of the policy whose rules the exception suppressed.
ruleIds-
The IDs of the rules that the exception suppressed.
For more information about policy exceptions, see Policy exceptions.
Looking up a vulnerability
Baseline evidence can include a list of vulnerability IDs. To read the metadata for a
vulnerability ID, pass it to the get-vulnerability command:
PROMPT>aws continuum get-vulnerability \ --regionregion\ --vulnerability-idvulnerability-id{ "id": "vulnerability-id", "malicious": true, "severity": "CRITICAL", "analysisState": "EXPLOITABLE", "description": "description", "cwes": [ "cwe-id" ], "advisoryUrls": [ "advisory-url" ] }
Continuum for software supply chain accepts any vulnerability ID from baseline evidence. If the ID is unknown,
Continuum for software supply chain returns a ResourceNotFoundException. The vulnerability metadata is
shared reference data, not data about your account.
Fields
The output holds the following fields:
id-
The vulnerability ID.
malicious-
Whether the vulnerability is classified as malicious. This value describes the vulnerability, not a package.
severity-
The severity rating of the vulnerability, one of
CRITICAL,HIGH,MEDIUM,LOW,INFO,NONE, orUNKNOWN.INFOis informational, with no direct security impact.NONEmeans no severity is assigned.UNKNOWNmeans the severity isn't known. analysisState-
The analysis state of the vulnerability, one of
RESOLVED,RESOLVED_WITH_PEDIGREE,EXPLOITABLE,IN_TRIAGE,FALSE_POSITIVE, orNOT_AFFECTED.RESOLVED_WITH_PEDIGREEmeans the vulnerability is remediated, with evidence in the component's pedigree. description-
A description of the vulnerability.
cwes-
The Common Weakness Enumeration (CWE) identifiers for the vulnerability.
advisoryUrls-
Links to advisories for the vulnerability.
A vulnerability's severity isn't the same as a package's
INSPECTOR_SEVERITY, which a rule tests. For how a package's severity is computed,
see Signals, operators, and values.