

# AWS Continuum for software supply chain concepts

**Note**  
AWS Continuum for software supply chain is in preview release and is subject to change.

This topic explains the concepts and terms that Continuum for software supply chain uses when it evaluates a package. Continuum for software supply chain checks each package against the service-managed malicious-package baseline, together with the policies and policy exceptions in your account, and records every decision with the evidence behind it. Continuum for software supply chain evaluates software packages in the supported ecosystems. For the list, see [Supported ecosystems](#sc-concepts-package-identity-ecosystems).

**Topics**
+ [The malicious-package baseline](#sc-concepts-baseline)
+ [Policies, rules, and conditions](#sc-concepts-policies)
+ [Policy exceptions](#sc-concepts-exceptions)
+ [Package decisions and evidence](#sc-concepts-decisions)
+ [Package identity](#sc-concepts-package-identity)

## The malicious-package baseline
<a name="sc-concepts-baseline"></a>

The malicious-package baseline is a service-managed policy that Continuum for software supply chain applies to every package it evaluates. It is the default protection: you don't add a rule or turn anything on to get it. The baseline is read-only and scoped to your account. You can't turn it off, change it, or delete it, and no account setting turns it off. You read the baseline with the `GetSupplyChainManagedPolicy` operation. The baseline has the managed policy ID `malicious` and a single rule with the rule ID `malicious-package`. The rule denies a package when the `MALICIOUS` signal is present, and it runs in `ENFORCE` mode. The Amazon malicious package behavioral detection engine identifies the malicious packages that the baseline blocks.

### Precedence over your rules
<a name="sc-concepts-baseline-precedence"></a>

When Continuum for software supply chain evaluates a package, it applies your rules and policy exceptions, and it applies the malicious-package baseline. A baseline match that no exception suppresses takes precedence over your rules. For exceptions on the baseline, see [Exceptions on the baseline](#sc-concepts-exceptions-baseline).

## Policies, rules, and conditions
<a name="sc-concepts-policies"></a>

A policy is deny-only. It belongs to one account in one AWS Region and contains one or more rules. Continuum for software supply chain evaluates each rule on its own. A rule matches a package when all of its conditions are true. Continuum for software supply chain denies a package when a rule in enforce mode matches it and no active policy exception suppresses that rule. Continuum for software supply chain also denies a package when the malicious-package baseline matches and no exception suppresses it. Otherwise, the package is allowed. When several rules match the same package, the strongest enforcement mode applies.

### Signals, operators, and values
<a name="sc-concepts-signals"></a>

Each condition compares a signal to a value by using an operator. You can use the following signals in your own policies:

`INSPECTOR_SEVERITY`  
Matches on the severity rating of a package. A package's severity is the highest rating among the vulnerabilities matched to it. The severity is `UNTRIAGED` when those ratings are untriaged, and `NONE` when the package has no rating. A rule that tests severity never matches a package whose severity is `NONE`. To look up a vulnerability, see [Looking up a vulnerability](sc-decisions.md#sc-decisions-vulnerability).

`KEV`  
Matches when the package has a vulnerability in the Cybersecurity and Infrastructure Security Agency (CISA) Known Exploited Vulnerabilities (KEV) catalog. Use the `PRESENT` operator to match on this signal.

`PACKAGE_IDENTITY`  
Matches a specific package by its identity.

The `MALICIOUS` signal is reserved for service-managed policies. You can't use `MALICIOUS` in your own policies, and a request that uses it is rejected.

The operators are `MATCHES`, `AT_LEAST`, `EQUALS`, `NOT_EQUALS`, `IN`, and `PRESENT`. No signal takes a bare string value. Each signal takes only the operators and the value shown in the following table:


| Signal | Operators | Value | 
| --- | --- | --- | 
| PACKAGE\_IDENTITY | MATCHES | A package identity: an ecosystem, a name, and optionally a version or a versionRange. | 
| INSPECTOR\_SEVERITY | EQUALS | A single severity value: LOW, MEDIUM, HIGH, CRITICAL, or UNTRIAGED. | 
| INSPECTOR\_SEVERITY | AT\_LEAST, NOT\_EQUALS | A single severity value: LOW, MEDIUM, HIGH, or CRITICAL. The value UNTRIAGED is rejected. | 
| INSPECTOR\_SEVERITY | IN | A set of severity values, such as ["HIGH", "UNTRIAGED"]. Continuum for software supply chain rejects duplicate values. | 
| KEV | PRESENT | None. | 

The `KEV` signal takes the `PRESENT` operator and no value. Any other operator, or a value, returns a `ValidationException` with the following message: `The signal KEV, operator <op>, and condition value variant are incompatible.`

### Enforcement modes
<a name="sc-concepts-enforcement-modes"></a>

Each rule has an enforcement mode, either `AUDIT` or `ENFORCE`. Use `AUDIT` to see what would be blocked without stopping installs. When an `AUDIT` rule matches, the evaluated action is `DENY`, but the enforcement action is `ALLOW`. When an `ENFORCE` rule matches, the enforcement action is `DENY`.

`AUDIT` is a per-rule enforcement mode. There is no account-level setting that puts your account in audit, and `AUDIT` doesn't apply to the malicious-package baseline, which always runs in `ENFORCE`.

A decision also has an enforcement mode, which is `NONE`, `AUDIT`, or `ENFORCE`. The mode is `NONE` when nothing matched, or when policy exceptions suppressed every match. Otherwise, it is the strongest mode among the matches that no exception suppressed. A malicious-package baseline match reports `ENFORCE`. Your client acts on the enforcement action only.

The `KEV` signal works differently from the baseline: a package is denied for a KEV match only when you add a rule that uses the `KEV` signal with the `PRESENT` operator. Continuum for software supply chain doesn't block KEV packages by default.

## Policy exceptions
<a name="sc-concepts-exceptions"></a>

A policy exception suppresses specific rules of one policy for packages that match one package identity. An exception never allows a package by itself. It only suppresses rules. Other rules still apply to that package.

### Scope, expiry, and status
<a name="sc-concepts-exceptions-scope"></a>

An exception needs a justification and an expiry. The expiry can be up to 365 days after you create the exception. Continuum for software supply chain computes the status of an exception, `ACTIVE` or `EXPIRED`, from its expiry time. `ACTIVE` means only that the exception hasn't expired. An active exception applies to a decision only when the package, policy, and rules match. Continuum for software supply chain judges the expiry at the time it evaluates the package. Every rule ID that an exception names must exist in the policy that it references. Otherwise, the request to create the exception is rejected.

### Exceptions on the baseline
<a name="sc-concepts-exceptions-baseline"></a>

An exception can target the malicious-package baseline. It references the managed policy ID `malicious` and the rule ID `malicious-package`. Because the baseline has a single rule, an exception on the baseline names that one rule.

An active exception on the baseline lets a known-malicious package install. Before you create one, read the warning in [Exception for the baseline](sc-policy-exceptions.md#sc-policy-exceptions-creating-baseline).

## Package decisions and evidence
<a name="sc-concepts-decisions"></a>

Continuum for software supply chain records a package decision each time it evaluates a package. A decision is immutable: it records the result at the time of evaluation and is never re-evaluated. Each decision is identified by a decision ID.

### Decision fields and reasons
<a name="sc-concepts-decisions-reasons"></a>

A decision records an evaluated action and an enforcement action. The evaluated action is `DENY` when the baseline or a deny rule matched and no exception suppressed it. Otherwise, it is `ALLOW`. Your client acts on the enforcement action only.

A decision has one of the following reasons:

`MALICIOUS_PACKAGE`  
The malicious-package baseline matched the package and no policy exception suppressed it.

`NO_DENY_MATCH`  
Nothing matched the package, or policy exceptions suppressed every match.

`POLICY_RULE_MATCHED`  
A rule in one of your policies matched the package and no policy exception suppressed it. This reason covers rules in both `AUDIT` and `ENFORCE` mode.

When the only unsuppressed match is an `AUDIT` rule, the reason is `POLICY_RULE_MATCHED`, the evaluated action is `DENY`, the enforcement action is `ALLOW`, and the decision's enforcement mode is `AUDIT`.

### Evidence types
<a name="sc-concepts-decisions-evidence"></a>

Continuum for software supply chain records the evidence that explains each decision. It records evidence at decision time and never re-evaluates it. There are three evidence types.

`mandatoryBaseline`  
A match from the malicious-package baseline.

`policyException`  
A policy exception that suppressed a match.

`policyRuleMatch`  
A match from a rule in one of your policies. The `enforcementMode` of this evidence is the rule's mode at the time of evaluation, either `AUDIT` or `ENFORCE`.

### Retention
<a name="sc-concepts-decisions-retention"></a>

Continuum for software supply chain stores each package decision for 45 days.

## Package identity
<a name="sc-concepts-package-identity"></a>

Continuum for software supply chain identifies a package by an ecosystem, a name, and optionally a version or version range.

### Package URLs
<a name="sc-concepts-package-identity-purl"></a>

A package URL (purl) identifies a package, such as `pkg:npm/lodash@4.17.21`, which identifies version 4.17.21 of the `lodash` package in the npm ecosystem. In a decision response, the `canonicalPurl` field is the package URL that Continuum for software supply chain evaluated, as the service accepted it. It is not a normalized rewrite.

npm package names are case-sensitive, following the purl specification. Continuum for software supply chain accepts mixed-case names, such as `pkg:npm/JSONStream@1.3.5`, and treats `JSONStream` and `jsonstream` as different packages. Your rules and exceptions use the name as it appears in the registry.

### Versions and version ranges
<a name="sc-concepts-package-identity-versions"></a>

You identify a package version in one of two ways:
+ `version` is an exact version, from 1 to 256 characters.
+ `versionRange` is one or more comparisons separated by commas, such as `>=1.0, <2.0`. Each comparison is `=`, `>`, `>=`, `<`, or `<=` followed by a version in the ecosystem's own format, from 1 to 256 characters.

Ecosystem shorthands such as `^1.0` or `~=1.2` aren't accepted. The `version` and `versionRange` fields are mutually exclusive. If you omit both, the package identity matches every version.

If you provide a version range that the ecosystem doesn't accept, Continuum for software supply chain returns a `ValidationException` with the following message, where the field path ends in `packageIdentity/versionRange`: `1 validation error detected. '<range>' is not a valid <ecosystem> package version range.`

### Supported ecosystems
<a name="sc-concepts-package-identity-ecosystems"></a>

Continuum for software supply chain supports the following package ecosystems. Each ecosystem has a purl type that you use in a package URL and a package identity:<a name="sc-concepts-package-identity-ecosystems-table"></a>
+ cargo (purl type `cargo`)
+ gem (purl type `gem`)
+ Go (purl type `golang`)
+ Maven (purl type `maven`)
+ npm (purl type `npm`)
+ NuGet (purl type `nuget`). Continuum for software supply chain evaluates NuGet (.NET) packages on Linux.
+ pip (purl type `pypi`)