← Back to Pull requests

[DOCS-15385] Document SCFW organization policies and Explorer #41814

Merged
melamos merged 1 files (103 lines) on Nov 24, 2026 21:01 UTC
View on GitHub
melamos melamos commented on Nov 16, 2026 19:00 UTC
Author

<!-- Note: Please remember to review the Datadog Documentation Contribution Guidelines if you have not yet done so. -->

What does this PR do? What is the motivation?

Adds details about custom SCFW policies, including:

  • How policies relate to Datadog checks, how to edit the policy, the policy schema, and an example policy.

  • How to use the SCFW Explorer to see why SCFW blocked or allowed an installation.
  • Merge readiness

  • Ready for merge

  • <!--
    If you're waiting for a release or there are other considerations that you want us to be aware of, list them here. If the PR is ready to be merged once it receives the required reviews, check the box above after you've created the PR.
    -->

    AI assistance

    Used Claude Code to draft the new sections, check UI labels, read the public SCFW CLI source and policy schema, and run style checks. The author reviewed and edited all content.

    For Datadog employees:

  • ⚠️ Your branch name MUST follow the <name>/<description> convention and include the forward slash (/). If you've already created your PR with an incorrect branch name, please rename your branch and open a fresh PR.

  • 🤖 New: Comment with /review to run an automated check that catches common issues before a Documentation team member reviews your PR.
  • Additional notes

    <!-- Previewing the PR: Assuming you are a Datadog employee and named your branch <yourname>/<description>, a preview build will run and links to the preview output will be auto-generated and posted in the PR comments. The links will 404 until the preview build is finished running. -->

    Diff: 103 lines (+101 / -2) across 1 files Reviewer: marcwieserdev Review duration: 11640m
    All Vouch review confidence checks passed
    Residual risk 0.05 = Change Risk (0.36) × (1 − Review Confidence (0.87)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 103 lines diff across 1 files
    0.36
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.82 · 5 substantive comment(s)
    0.82
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    86%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.278
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    21 items
    github-actions[bot] github-actions[bot] commented on Nov 16, 2026 19:03 UTC
    Bot
    melamos melamos commented on code on Nov 16, 2026 19:10 UTC
    Code Review
    hugo/content/en/security/code_security/software_composition_analysis/supply_chain_firewall/_index.md:1
    @@ -10,12 +10,17 @@ further_reading:
     
     {{< callout url=https://docs.google.com/forms/d/1Xqh5h1n3-jC7au2t30fdTq732dkTJqt_cb7C7T-AkPc/viewform?edit_requested=true
      btn_hidden="false" header="Join the Preview!">}}
    -Supply Chain Firewall is in preview.
    +Supply Chain Firewall is in preview. Preview access is required to use the SCFW CLI, Explorer, and organization policies.
     {{< /callout >}}
     
     Supply Chain Firewall (SCFW) prevents malicious open source packages from entering your development environments at the point of installation, before they reach repositories or CI/CD pipelines.
     
    -SCFW wraps supported package manager commands (`npm`, `pip`, and `poetry`). When you run an installation command through SCFW, it evaluates the package against Datadog Security Research's [threat intelligence feed][1] of known-malicious and compromised open source packages as well as custom allow and block policies you configure for your organization.
    +SCFW wraps supported package manager commands (`npm`, `pip`, and `poetry`). SCFW evaluates each package in an installation command against the Datadog Security Research [threat intelligence feed][1] of known-malicious and compromised open source packages. SCFW also evaluates each package against [custom allow and block policies](#organization-policies) you configure for your organization.
    +
    +<!-- TODO: Confirm that this is the full list of Datadog checks on each package:
    +- Datadog threat intelligence feed (malicious packages)
    +- Vulnerability advisories (GHSA and DDSA)
    +Sources: SCFW README v4.1.0, demo org SCFW Explorer. -->

    @marcwieserdev Please confirm

    melamos melamos commented on code on Nov 16, 2026 19:10 UTC
    Code Review
    hugo/content/en/security/code_security/software_composition_analysis/supply_chain_firewall/_index.md:1
    @@ -131,6 +136,88 @@ To check whether your credentials and aliases are configured correctly, run:
     scfw doctor
     ```
     
    +## Organization policies
    +
    +Organization policies adapt SCFW to your security requirements. For example, a policy can block a package version your team doesn't trust, or allow a package your team has vetted.
    +
    +Each Datadog organization has one organization policy, defined in the same organization as the SCFW API and application keys. Editing the organization policy is optional, and an admin typically sets the policy once for the whole organization.
    +
    +<!-- TODO: Confirm that the SCFW GitHub Action uses the organization policy from the same organization as its API and application keys. -->

    @marcwieserdev Please confirm

    melamos melamos commented on code on Nov 16, 2026 19:10 UTC
    Code Review
    hugo/content/en/security/code_security/software_composition_analysis/supply_chain_firewall/_index.md:1
    @@ -131,6 +136,88 @@ To check whether your credentials and aliases are configured correctly, run:
     scfw doctor
     ```
     
    +## Organization policies
    +
    +Organization policies adapt SCFW to your security requirements. For example, a policy can block a package version your team doesn't trust, or allow a package your team has vetted.
    +
    +Each Datadog organization has one organization policy, defined in the same organization as the SCFW API and application keys. Editing the organization policy is optional, and an admin typically sets the policy once for the whole organization.
    +
    +<!-- TODO: Confirm that the SCFW GitHub Action uses the organization policy from the same organization as its API and application keys. -->
    +
    +The organization policy adds to the checks Datadog runs on each package. When the organization policy and a Datadog check disagree about a package, the organization policy takes precedence. For example, a Datadog check might flag a package as malicious while the organization policy has an allow rule for the package. In that case, SCFW allows the installation.
    +
    +<!-- TODO: Confirm which rule wins when a package matches both an allow rule and a block rule in the same organization policy. -->

    @marcwieserdev Please confirm

    melamos melamos commented on code on Nov 16, 2026 19:10 UTC
    Code Review
    hugo/content/en/security/code_security/software_composition_analysis/supply_chain_firewall/_index.md:1
    @@ -131,6 +136,88 @@ To check whether your credentials and aliases are configured correctly, run:
     scfw doctor
     ```
     
    +## Organization policies
    +
    +Organization policies adapt SCFW to your security requirements. For example, a policy can block a package version your team doesn't trust, or allow a package your team has vetted.
    +
    +Each Datadog organization has one organization policy, defined in the same organization as the SCFW API and application keys. Editing the organization policy is optional, and an admin typically sets the policy once for the whole organization.
    +
    +<!-- TODO: Confirm that the SCFW GitHub Action uses the organization policy from the same organization as its API and application keys. -->
    +
    +The organization policy adds to the checks Datadog runs on each package. When the organization policy and a Datadog check disagree about a package, the organization policy takes precedence. For example, a Datadog check might flag a package as malicious while the organization policy has an allow rule for the package. In that case, SCFW allows the installation.
    +
    +<!-- TODO: Confirm which rule wins when a package matches both an allow rule and a block rule in the same organization policy. -->
    +
    +Organization policies control two kinds of settings:
    +
    +- **Behaviors**: How SCFW handles warning-level findings in non-interactive environments, and how SCFW treats recently published packages.
    +- **Rules**: Package versions SCFW blocks or allows, for npm and PyPI packages.
    +
    +### Edit the organization policy
    +
    +Edit the organization policy to block or allow specific package versions, and to change how SCFW handles warnings and recently published packages.
    +
    +<!-- TODO: Confirm which Datadog permission is required to edit the organization policy. No permission mentions SCFW or Supply Chain Firewall. -->

    @marcwieserdev Please confirm

    melamos melamos commented on code on Nov 16, 2026 19:11 UTC
    Code Review
    hugo/content/en/security/code_security/software_composition_analysis/supply_chain_firewall/_index.md:1
    @@ -131,6 +136,88 @@ To check whether your credentials and aliases are configured correctly, run:
     scfw doctor
     ```
     
    +## Organization policies
    +
    +Organization policies adapt SCFW to your security requirements. For example, a policy can block a package version your team doesn't trust, or allow a package your team has vetted.
    +
    +Each Datadog organization has one organization policy, defined in the same organization as the SCFW API and application keys. Editing the organization policy is optional, and an admin typically sets the policy once for the whole organization.
    +
    +<!-- TODO: Confirm that the SCFW GitHub Action uses the organization policy from the same organization as its API and application keys. -->
    +
    +The organization policy adds to the checks Datadog runs on each package. When the organization policy and a Datadog check disagree about a package, the organization policy takes precedence. For example, a Datadog check might flag a package as malicious while the organization policy has an allow rule for the package. In that case, SCFW allows the installation.
    +
    +<!-- TODO: Confirm which rule wins when a package matches both an allow rule and a block rule in the same organization policy. -->
    +
    +Organization policies control two kinds of settings:
    +
    +- **Behaviors**: How SCFW handles warning-level findings in non-interactive environments, and how SCFW treats recently published packages.
    +- **Rules**: Package versions SCFW blocks or allows, for npm and PyPI packages.
    +
    +### Edit the organization policy
    +
    +Edit the organization policy to block or allow specific package versions, and to change how SCFW handles warnings and recently published packages.
    +
    +<!-- TODO: Confirm which Datadog permission is required to edit the organization policy. No permission mentions SCFW or Supply Chain Firewall. -->
    +
    +1. In the organization with your SCFW API and application keys, open {{< ui >}}Code Security{{< /ui >}} > {{< ui >}}Settings{{< /ui >}} > {{< ui >}}Supply Chain Firewall Settings{{< /ui >}}.
    +1. In the {{< ui >}}Policy Configuration{{< /ui >}} editor, edit the policy YAML. For details about available fields, see the [Policy schema](#policy-schema) section.
    +
    +   To discard your edits and restore the default policy, click {{< ui >}}Reset to Default{{< /ui >}}.
    +
    +1. Click {{< ui >}}Save Configuration{{< /ui >}}.
    +
    +### Policy schema
    +
    +Organization policies follow the published [SCFW policy schema][5].
    +
    +The `behaviours` and `recent_packages_behaviour` keys use British spelling.
    +
    +| Field | Description |
    +| --- | --- |
    +| `schema-version` | Required. The schema version. Must be `1`. |
    +| `behaviours.non_interactive_block_on_warning` | (Default: `true`) Whether SCFW blocks commands with only warning-level findings in non-interactive environments, such as CI pipelines. Set to `false` to allow those commands. |
    +| `behaviours.recent_packages_behaviour` | (Default: `block`) What SCFW does with packages published less than `recent_package_timeout` seconds ago. Accepts `block`, `warn`, or `allow`. |
    +| `behaviours.recent_package_timeout` | (Default: `86400`) Number of seconds after publication during which SCFW treats a package as recent. The default is 24 hours. |
    +| `policies.block` | List of rules for package versions SCFW blocks. |
    +| `policies.allow` | List of rules for package versions SCFW allows. |
    +
    +<!-- TODO: Confirm: in non-interactive environments such as CI, does behaviours.non_interactive_block_on_warning override --allow-on-warning, --block-on-warning, and SCFW_ON_WARNING?
    +Evidence: in the CLI code (v4.1.0), the CLI options apply only when Datadog returns WARN. In the demo org, with this setting at false, Datadog returned ALLOW. -->

    @marcwieserdev Please confirm

    melamos melamos commented on code on Nov 16, 2026 19:11 UTC
    Code Review
    hugo/content/en/security/code_security/software_composition_analysis/supply_chain_firewall/_index.md:1
    @@ -131,6 +136,88 @@ To check whether your credentials and aliases are configured correctly, run:
     scfw doctor
     ```
     
    +## Organization policies
    +
    +Organization policies adapt SCFW to your security requirements. For example, a policy can block a package version your team doesn't trust, or allow a package your team has vetted.
    +
    +Each Datadog organization has one organization policy, defined in the same organization as the SCFW API and application keys. Editing the organization policy is optional, and an admin typically sets the policy once for the whole organization.
    +
    +<!-- TODO: Confirm that the SCFW GitHub Action uses the organization policy from the same organization as its API and application keys. -->
    +
    +The organization policy adds to the checks Datadog runs on each package. When the organization policy and a Datadog check disagree about a package, the organization policy takes precedence. For example, a Datadog check might flag a package as malicious while the organization policy has an allow rule for the package. In that case, SCFW allows the installation.
    +
    +<!-- TODO: Confirm which rule wins when a package matches both an allow rule and a block rule in the same organization policy. -->
    +
    +Organization policies control two kinds of settings:
    +
    +- **Behaviors**: How SCFW handles warning-level findings in non-interactive environments, and how SCFW treats recently published packages.
    +- **Rules**: Package versions SCFW blocks or allows, for npm and PyPI packages.
    +
    +### Edit the organization policy
    +
    +Edit the organization policy to block or allow specific package versions, and to change how SCFW handles warnings and recently published packages.
    +
    +<!-- TODO: Confirm which Datadog permission is required to edit the organization policy. No permission mentions SCFW or Supply Chain Firewall. -->
    +
    +1. In the organization with your SCFW API and application keys, open {{< ui >}}Code Security{{< /ui >}} > {{< ui >}}Settings{{< /ui >}} > {{< ui >}}Supply Chain Firewall Settings{{< /ui >}}.
    +1. In the {{< ui >}}Policy Configuration{{< /ui >}} editor, edit the policy YAML. For details about available fields, see the [Policy schema](#policy-schema) section.
    +
    +   To discard your edits and restore the default policy, click {{< ui >}}Reset to Default{{< /ui >}}.
    +
    +1. Click {{< ui >}}Save Configuration{{< /ui >}}.
    +
    +### Policy schema
    +
    +Organization policies follow the published [SCFW policy schema][5].
    +
    +The `behaviours` and `recent_packages_behaviour` keys use British spelling.
    +
    +| Field | Description |
    +| --- | --- |
    +| `schema-version` | Required. The schema version. Must be `1`. |
    +| `behaviours.non_interactive_block_on_warning` | (Default: `true`) Whether SCFW blocks commands with only warning-level findings in non-interactive environments, such as CI pipelines. Set to `false` to allow those commands. |
    +| `behaviours.recent_packages_behaviour` | (Default: `block`) What SCFW does with packages published less than `recent_package_timeout` seconds ago. Accepts `block`, `warn`, or `allow`. |
    +| `behaviours.recent_package_timeout` | (Default: `86400`) Number of seconds after publication during which SCFW treats a package as recent. The default is 24 hours. |
    +| `policies.block` | List of rules for package versions SCFW blocks. |
    +| `policies.allow` | List of rules for package versions SCFW allows. |
    +
    +<!-- TODO: Confirm: in non-interactive environments such as CI, does behaviours.non_interactive_block_on_warning override --allow-on-warning, --block-on-warning, and SCFW_ON_WARNING?
    +Evidence: in the CLI code (v4.1.0), the CLI options apply only when Datadog returns WARN. In the demo org, with this setting at false, Datadog returned ALLOW. -->
    +
    +Each rule in `policies.block` or `policies.allow` accepts these fields:
    +
    +| Field | Description |
    +| --- | --- |
    +| `ecosystem` | Required. The package ecosystem. Accepts `npm` or `pypi`. |
    +| `package_name` | Required. The package name. |
    +| `package_version` | Required. A glob matching the package versions the rule applies to, such as `*` for all versions. |
    +
    +<!-- TODO: Confirm the glob syntax for package_version. For example, does "2.31.*" match 2.31.0 and 2.31.5? -->

    @marcwieserdev Please confirm

    melamos melamos commented on Nov 16, 2026 19:13 UTC
    Reviewer

    @marcwieserdev Marking pending question so they're easy to find.

    marcwieserdev marcwieserdev commented on code on Nov 18, 2026 12:39 UTC
    Code Review
    hugo/content/en/security/code_security/software_composition_analysis/supply_chain_firewall/_index.md:1
    @@ -10,12 +10,17 @@ further_reading:
     
     {{< callout url=https://docs.google.com/forms/d/1Xqh5h1n3-jC7au2t30fdTq732dkTJqt_cb7C7T-AkPc/viewform?edit_requested=true
      btn_hidden="false" header="Join the Preview!">}}
    -Supply Chain Firewall is in preview.
    +Supply Chain Firewall is in preview. Preview access is required to use the SCFW CLI, Explorer, and organization policies.
     {{< /callout >}}
     
     Supply Chain Firewall (SCFW) prevents malicious open source packages from entering your development environments at the point of installation, before they reach repositories or CI/CD pipelines.
     
    -SCFW wraps supported package manager commands (`npm`, `pip`, and `poetry`). When you run an installation command through SCFW, it evaluates the package against Datadog Security Research's [threat intelligence feed][1] of known-malicious and compromised open source packages as well as custom allow and block policies you configure for your organization.
    +SCFW wraps supported package manager commands (`npm`, `pip`, and `poetry`). SCFW evaluates each package in an installation command against the Datadog Security Research [threat intelligence feed][1] of known-malicious and compromised open source packages. SCFW also evaluates each package against [custom allow and block policies](#organization-policies) you configure for your organization.
    +
    +<!-- TODO: Confirm that this is the full list of Datadog checks on each package:
    +- Datadog threat intelligence feed (malicious packages)
    +- Vulnerability advisories (GHSA and DDSA)
    +Sources: SCFW README v4.1.0, demo org SCFW Explorer. -->

    There is also user defined policy affecting an entire org, in that order :
    1. user defined policy
    2. Datadog threat intelligence feed
    3. Advisories (this one issuing only warnings)

    marcwieserdev marcwieserdev commented on code on Nov 18, 2026 12:39 UTC
    Code Review
    hugo/content/en/security/code_security/software_composition_analysis/supply_chain_firewall/_index.md:1
    @@ -131,6 +136,88 @@ To check whether your credentials and aliases are configured correctly, run:
     scfw doctor
     ```
     
    +## Organization policies
    +
    +Organization policies adapt SCFW to your security requirements. For example, a policy can block a package version your team doesn't trust, or allow a package your team has vetted.
    +
    +Each Datadog organization has one organization policy, defined in the same organization as the SCFW API and application keys. Editing the organization policy is optional, and an admin typically sets the policy once for the whole organization.
    +
    +<!-- TODO: Confirm that the SCFW GitHub Action uses the organization policy from the same organization as its API and application keys. -->

    Yes

    marcwieserdev marcwieserdev commented on code on Nov 18, 2026 12:41 UTC
    Code Review
    hugo/content/en/security/code_security/software_composition_analysis/supply_chain_firewall/_index.md:1
    @@ -131,6 +136,88 @@ To check whether your credentials and aliases are configured correctly, run:
     scfw doctor
     ```
     
    +## Organization policies
    +
    +Organization policies adapt SCFW to your security requirements. For example, a policy can block a package version your team doesn't trust, or allow a package your team has vetted.
    +
    +Each Datadog organization has one organization policy, defined in the same organization as the SCFW API and application keys. Editing the organization policy is optional, and an admin typically sets the policy once for the whole organization.
    +
    +<!-- TODO: Confirm that the SCFW GitHub Action uses the organization policy from the same organization as its API and application keys. -->
    +
    +The organization policy adds to the checks Datadog runs on each package. When the organization policy and a Datadog check disagree about a package, the organization policy takes precedence. For example, a Datadog check might flag a package as malicious while the organization policy has an allow rule for the package. In that case, SCFW allows the installation.
    +
    +<!-- TODO: Confirm which rule wins when a package matches both an allow rule and a block rule in the same organization policy. -->

    The block wins

    marcwieserdev marcwieserdev commented on code on Nov 18, 2026 12:42 UTC
    Code Review
    hugo/content/en/security/code_security/software_composition_analysis/supply_chain_firewall/_index.md:1
    @@ -131,6 +136,88 @@ To check whether your credentials and aliases are configured correctly, run:
     scfw doctor
     ```
     
    +## Organization policies
    +
    +Organization policies adapt SCFW to your security requirements. For example, a policy can block a package version your team doesn't trust, or allow a package your team has vetted.
    +
    +Each Datadog organization has one organization policy, defined in the same organization as the SCFW API and application keys. Editing the organization policy is optional, and an admin typically sets the policy once for the whole organization.
    +
    +<!-- TODO: Confirm that the SCFW GitHub Action uses the organization policy from the same organization as its API and application keys. -->
    +
    +The organization policy adds to the checks Datadog runs on each package. When the organization policy and a Datadog check disagree about a package, the organization policy takes precedence. For example, a Datadog check might flag a package as malicious while the organization policy has an allow rule for the package. In that case, SCFW allows the installation.
    +
    +<!-- TODO: Confirm which rule wins when a package matches both an allow rule and a block rule in the same organization policy. -->
    +
    +Organization policies control two kinds of settings:
    +
    +- **Behaviors**: How SCFW handles warning-level findings in non-interactive environments, and how SCFW treats recently published packages.
    +- **Rules**: Package versions SCFW blocks or allows, for npm and PyPI packages.
    +
    +### Edit the organization policy
    +
    +Edit the organization policy to block or allow specific package versions, and to change how SCFW handles warnings and recently published packages.
    +
    +<!-- TODO: Confirm which Datadog permission is required to edit the organization policy. No permission mentions SCFW or Supply Chain Firewall. -->
    +
    +1. In the organization with your SCFW API and application keys, open {{< ui >}}Code Security{{< /ui >}} > {{< ui >}}Settings{{< /ui >}} > {{< ui >}}Supply Chain Firewall Settings{{< /ui >}}.
    +1. In the {{< ui >}}Policy Configuration{{< /ui >}} editor, edit the policy YAML. For details about available fields, see the [Policy schema](#policy-schema) section.
    +
    +   To discard your edits and restore the default policy, click {{< ui >}}Reset to Default{{< /ui >}}.
    +
    +1. Click {{< ui >}}Save Configuration{{< /ui >}}.
    +
    +### Policy schema
    +
    +Organization policies follow the published [SCFW policy schema][5].
    +
    +The `behaviours` and `recent_packages_behaviour` keys use British spelling.
    +
    +| Field | Description |
    +| --- | --- |
    +| `schema-version` | Required. The schema version. Must be `1`. |
    +| `behaviours.non_interactive_block_on_warning` | (Default: `true`) Whether SCFW blocks commands with only warning-level findings in non-interactive environments, such as CI pipelines. Set to `false` to allow those commands. |
    +| `behaviours.recent_packages_behaviour` | (Default: `block`) What SCFW does with packages published less than `recent_package_timeout` seconds ago. Accepts `block`, `warn`, or `allow`. |
    +| `behaviours.recent_package_timeout` | (Default: `86400`) Number of seconds after publication during which SCFW treats a package as recent. The default is 24 hours. |
    +| `policies.block` | List of rules for package versions SCFW blocks. |
    +| `policies.allow` | List of rules for package versions SCFW allows. |
    +
    +<!-- TODO: Confirm: in non-interactive environments such as CI, does behaviours.non_interactive_block_on_warning override --allow-on-warning, --block-on-warning, and SCFW_ON_WARNING?
    +Evidence: in the CLI code (v4.1.0), the CLI options apply only when Datadog returns WARN. In the demo org, with this setting at false, Datadog returned ALLOW. -->

    Yes it overrides, as the cli will respect a block outcome which will be emitted by our backend if that option is set to true

    marcwieserdev marcwieserdev commented on code on Nov 18, 2026 12:43 UTC
    Code Review
    hugo/content/en/security/code_security/software_composition_analysis/supply_chain_firewall/_index.md:1
    @@ -131,6 +136,88 @@ To check whether your credentials and aliases are configured correctly, run:
     scfw doctor
     ```
     
    +## Organization policies
    +
    +Organization policies adapt SCFW to your security requirements. For example, a policy can block a package version your team doesn't trust, or allow a package your team has vetted.
    +
    +Each Datadog organization has one organization policy, defined in the same organization as the SCFW API and application keys. Editing the organization policy is optional, and an admin typically sets the policy once for the whole organization.
    +
    +<!-- TODO: Confirm that the SCFW GitHub Action uses the organization policy from the same organization as its API and application keys. -->
    +
    +The organization policy adds to the checks Datadog runs on each package. When the organization policy and a Datadog check disagree about a package, the organization policy takes precedence. For example, a Datadog check might flag a package as malicious while the organization policy has an allow rule for the package. In that case, SCFW allows the installation.
    +
    +<!-- TODO: Confirm which rule wins when a package matches both an allow rule and a block rule in the same organization policy. -->
    +
    +Organization policies control two kinds of settings:
    +
    +- **Behaviors**: How SCFW handles warning-level findings in non-interactive environments, and how SCFW treats recently published packages.
    +- **Rules**: Package versions SCFW blocks or allows, for npm and PyPI packages.
    +
    +### Edit the organization policy
    +
    +Edit the organization policy to block or allow specific package versions, and to change how SCFW handles warnings and recently published packages.
    +
    +<!-- TODO: Confirm which Datadog permission is required to edit the organization policy. No permission mentions SCFW or Supply Chain Firewall. -->
    +
    +1. In the organization with your SCFW API and application keys, open {{< ui >}}Code Security{{< /ui >}} > {{< ui >}}Settings{{< /ui >}} > {{< ui >}}Supply Chain Firewall Settings{{< /ui >}}.
    +1. In the {{< ui >}}Policy Configuration{{< /ui >}} editor, edit the policy YAML. For details about available fields, see the [Policy schema](#policy-schema) section.
    +
    +   To discard your edits and restore the default policy, click {{< ui >}}Reset to Default{{< /ui >}}.
    +
    +1. Click {{< ui >}}Save Configuration{{< /ui >}}.
    +
    +### Policy schema
    +
    +Organization policies follow the published [SCFW policy schema][5].
    +
    +The `behaviours` and `recent_packages_behaviour` keys use British spelling.
    +
    +| Field | Description |
    +| --- | --- |
    +| `schema-version` | Required. The schema version. Must be `1`. |
    +| `behaviours.non_interactive_block_on_warning` | (Default: `true`) Whether SCFW blocks commands with only warning-level findings in non-interactive environments, such as CI pipelines. Set to `false` to allow those commands. |
    +| `behaviours.recent_packages_behaviour` | (Default: `block`) What SCFW does with packages published less than `recent_package_timeout` seconds ago. Accepts `block`, `warn`, or `allow`. |
    +| `behaviours.recent_package_timeout` | (Default: `86400`) Number of seconds after publication during which SCFW treats a package as recent. The default is 24 hours. |
    +| `policies.block` | List of rules for package versions SCFW blocks. |
    +| `policies.allow` | List of rules for package versions SCFW allows. |
    +
    +<!-- TODO: Confirm: in non-interactive environments such as CI, does behaviours.non_interactive_block_on_warning override --allow-on-warning, --block-on-warning, and SCFW_ON_WARNING?
    +Evidence: in the CLI code (v4.1.0), the CLI options apply only when Datadog returns WARN. In the demo org, with this setting at false, Datadog returned ALLOW. -->
    +
    +Each rule in `policies.block` or `policies.allow` accepts these fields:
    +
    +| Field | Description |
    +| --- | --- |
    +| `ecosystem` | Required. The package ecosystem. Accepts `npm` or `pypi`. |
    +| `package_name` | Required. The package name. |
    +| `package_version` | Required. A glob matching the package versions the rule applies to, such as `*` for all versions. |
    +
    +<!-- TODO: Confirm the glob syntax for package_version. For example, does "2.31.*" match 2.31.0 and 2.31.5? -->

    yes, that's a classic glob matching

    marcwieserdev marcwieserdev commented on code on Nov 18, 2026 12:43 UTC
    Code Review
    hugo/content/en/security/code_security/software_composition_analysis/supply_chain_firewall/_index.md:1
    @@ -131,6 +136,88 @@ To check whether your credentials and aliases are configured correctly, run:
     scfw doctor
     ```
     
    +## Organization policies
    +
    +Organization policies adapt SCFW to your security requirements. For example, a policy can block a package version your team doesn't trust, or allow a package your team has vetted.
    +
    +Each Datadog organization has one organization policy, defined in the same organization as the SCFW API and application keys. Editing the organization policy is optional, and an admin typically sets the policy once for the whole organization.
    +
    +<!-- TODO: Confirm that the SCFW GitHub Action uses the organization policy from the same organization as its API and application keys. -->
    +
    +The organization policy adds to the checks Datadog runs on each package. When the organization policy and a Datadog check disagree about a package, the organization policy takes precedence. For example, a Datadog check might flag a package as malicious while the organization policy has an allow rule for the package. In that case, SCFW allows the installation.
    +
    +<!-- TODO: Confirm which rule wins when a package matches both an allow rule and a block rule in the same organization policy. -->
    +
    +Organization policies control two kinds of settings:
    +
    +- **Behaviors**: How SCFW handles warning-level findings in non-interactive environments, and how SCFW treats recently published packages.
    +- **Rules**: Package versions SCFW blocks or allows, for npm and PyPI packages.
    +
    +### Edit the organization policy
    +
    +Edit the organization policy to block or allow specific package versions, and to change how SCFW handles warnings and recently published packages.
    +
    +<!-- TODO: Confirm which Datadog permission is required to edit the organization policy. No permission mentions SCFW or Supply Chain Firewall. -->

    As per today it needs appsec_vm_write (“Vulnerability Management Write”)

    marcwieserdev marcwieserdev approved these changes on Nov 23, 2026 14:39 UTC
    Approved Reviewer

    Approved these changes.

    drichards-87 drichards-87 commented on code on Nov 24, 2026 18:45 UTC
    Code Review
    hugo/content/en/security/code_security/software_composition_analysis/supply_chain_firewall/_index.md:1
    @@ -131,6 +135,81 @@ To check whether your credentials and aliases are configured correctly, run:
     scfw doctor
     ```
     
    +## Organization policies
    +
    +Organization policies adapt SCFW to your security requirements. For example, a policy can block a package version your team doesn't trust, or allow a package your team has vetted.
    +
    +Each Datadog organization has one organization policy, defined in the same organization as the SCFW API and application keys. Editing the organization policy is optional, and an admin typically sets the policy once for the whole organization.
    +
    +The organization policy adds to the checks Datadog runs on each package. When the organization policy and a Datadog check disagree about a package, the organization policy takes precedence. For example, a Datadog check might flag a package as malicious while the organization policy has an allow rule for the package. In that case, SCFW allows the installation.
    +
    +If a package matches both an allow rule and a block rule in the organization policy, SCFW blocks the installation.
    +
    +Organization policies control two kinds of settings:
    +
    +- **Behaviors**: How SCFW handles warning-level findings in non-interactive environments, and how SCFW treats recently published packages.
    +- **Rules**: Package versions SCFW blocks or allows, for npm and PyPI packages.
    +
    +### Edit the organization policy
    +
    +Edit the organization policy to block or allow specific package versions, and to change how SCFW handles warnings and recently published packages.
    +
    +Editing the organization policy requires the {{< ui >}}Vulnerability Management Write{{< /ui >}} permission, `appsec_vm_write`.

    Editing the organization policy requires the {{< ui >}}Vulnerability Management Write{{< /ui >}} permission, `appsec_vm_write`. For more information, see [Datadog Role Permissions][6].
    

    drichards-87 drichards-87 commented on code on Nov 24, 2026 18:45 UTC
    Code Review
    hugo/content/en/security/code_security/software_composition_analysis/supply_chain_firewall/_index.md:1
    @@ -153,6 +232,24 @@ The `scfw run` command supports these options:
     
     The `SCFW_ON_WARNING` environment variable (`allow` or `block`) has the same effect as `--allow-on-warning` or `--block-on-warning`, and takes precedence when set. An environment variable is useful for enforcing a consistent policy across a CI environment without changing every invocation. In non-interactive contexts with no terminal, SCFW can't prompt for confirmation, so it blocks warning-level results by default unless `--allow-on-warning`, `--block-on-warning`, or `SCFW_ON_WARNING` is set.
     
    +For SCFW CLIs connected to Datadog, the organization policy setting `behaviours.non_interactive_block_on_warning` takes precedence over these options in non-interactive contexts. See the [Policy schema](#policy-schema) section.
    +
    +## Investigate installation outcomes
    +
    +SCFW might block a package your team needs, or allow a package you expected SCFW to block. The SCFW Explorer shows which Datadog checks and organization policy rules decided each outcome.
    +
    +The SCFW Explorer includes every installation command inspected by an SCFW CLI configured with Datadog credentials.
    +
    +1. Open the {{< ui >}}Code Security{{< /ui >}} > {{< ui >}}Supply Chain Firewall{{< /ui >}} tab.

    1. Open {{< ui >}}Code Security{{< /ui >}} > {{< ui >}}Supply Chain Firewall{{< /ui >}} to view the SCFW Explorer.
    

    drichards-87 drichards-87 commented on code on Nov 24, 2026 18:45 UTC
    Code Review
    hugo/content/en/security/code_security/software_composition_analysis/supply_chain_firewall/_index.md:1
    @@ -187,3 +284,4 @@ Then remove the `scfw` binary, for example by deleting it from `/usr/local/bin`,
     [2]: https://github.com/DataDog/supply-chain-firewall/releases/latest
     [3]: /security/code_security/dev_tool_int/scfw_github_action/
     [4]: /integrations/supply-chain-firewall/
    +[5]: https://raw.githubusercontent.com/DataDog/schema/main/code-security/scfw/v1.0/schema.json

    [5]: https://raw.githubusercontent.com/DataDog/schema/main/code-security/scfw/v1.0/schema.json
    [6]: /account_management/rbac/permissions/
    

    drichards-87 drichards-87 approved these changes on Nov 24, 2026 18:49 UTC
    Approved Reviewer

    Approved these changes.

    melamos melamos commented on code on Nov 24, 2026 19:34 UTC
    Code Review
    hugo/content/en/security/code_security/software_composition_analysis/supply_chain_firewall/_index.md:1
    @@ -153,6 +232,24 @@ The `scfw run` command supports these options:
     
     The `SCFW_ON_WARNING` environment variable (`allow` or `block`) has the same effect as `--allow-on-warning` or `--block-on-warning`, and takes precedence when set. An environment variable is useful for enforcing a consistent policy across a CI environment without changing every invocation. In non-interactive contexts with no terminal, SCFW can't prompt for confirmation, so it blocks warning-level results by default unless `--allow-on-warning`, `--block-on-warning`, or `SCFW_ON_WARNING` is set.
     
    +For SCFW CLIs connected to Datadog, the organization policy setting `behaviours.non_interactive_block_on_warning` takes precedence over these options in non-interactive contexts. See the [Policy schema](#policy-schema) section.
    +
    +## Investigate installation outcomes
    +
    +SCFW might block a package your team needs, or allow a package you expected SCFW to block. The SCFW Explorer shows which Datadog checks and organization policy rules decided each outcome.
    +
    +The SCFW Explorer includes every installation command inspected by an SCFW CLI configured with Datadog credentials.
    +
    +1. Open the {{< ui >}}Code Security{{< /ui >}} > {{< ui >}}Supply Chain Firewall{{< /ui >}} tab.

    Keeping the tab removal, but dropping "to view the SCFW Explorer" since the intro already sets that up.

    1. Open {{< ui >}}Code Security{{< /ui >}} > {{< ui >}}Supply Chain Firewall{{< /ui >}}.
    

    Reviewers
    Assignees
    melamos melamos
    Labels
    risk: low confidence: 86.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 35.8% (MEDIUM) · Higher = larger blast radius
    35.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 86.8% · Lower = rushed or shallow review
    86.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 4.7% · Safe to merge
    4.7%