Skip to content

Correct pre-built policy pack coverage, and enforce the allowlist against the registry - #21055

Open
CamSoper wants to merge 4 commits into
masterfrom
claude/policy-funnel-draft-context-uc1jpa
Open

Correct pre-built policy pack coverage, and enforce the allowlist against the registry#21055
CamSoper wants to merge 4 commits into
masterfrom
claude/policy-funnel-draft-context-uc1jpa

Conversation

@CamSoper

@CamSoper CamSoper commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Proposed changes

Two things: the pre-built packs table understated what we ship, and the allowlist that decides what gets documented had no way to tell a product from a pack someone published privately to the org. The second is what let the first get "fixed" wrongly in an earlier revision of this PR.

1. Coverage corrections

/docs/insights/policy/policy-packs/pre-built-packs/ was written when several frameworks were AWS-only and never refreshed as coverage grew. The generated reference pages under /docs/reference/pre-built-policy-packs/ were right all along; the hand-maintained summary surfaces were the only thing telling readers we support less than we do. Two accounts independently concluded we don't support ISO 27001 and went elsewhere, while we ship 549 ISO 27001 policies across all three clouds.

Framework Table said Actually ships
ISO/IEC 27001:2022 AWS AWS, Azure, Google Cloud (238 + 158 + 153 = 549 policies)
PCI DSS v4.0.1 AWS AWS, Azure, Google Cloud
NIST SP 800-53 AWS, Google Cloud AWS, Azure, Google Cloud
CMMC 2.0 absent AWS

Also added ISO 27001 and CMMC to the framework lists on the Policies overview (which omitted ISO 27001 entirely), the policy packs overview, the Insights landing page, and the onboarding guide; and filled in the missing packs on the per-cloud AWS, Azure, and Google Cloud integration pages, where Azure and Google Cloud were each missing NIST, PCI DSS, and ISO 27001.

2. Removing hitrust-awsnative

@danbiwer flagged in review that the HITRUST AWS Native pack is private and not shipped to customers, and that docs automation had generated a public reference page for it. An earlier revision of this PR added it to the table on the strength of that page existing — that was wrong. 93d5904 removes it from the table, the AWS integrations page, data/policy_packs.yaml (which generated the page), the fetched policy data, and the lastmod ledger, and adds an S3 redirect for the now-removed reference URL.

@jkodroff has since deleted the pack from the pulumi org. That makes this PR time-sensitive: fetch-policy-packs.js throws when an allowlisted pack isn't in the org, so on master — which still carries the entry — tonight's 07:30 UTC run fails and pings #docs-ops. Merging this clears it.

3. Enforcing the allowlist (cd00d9a2)

The removal above fixes one bad row. This stops the next one.

data/policy_packs.yaml was already an allowlist, but its rule was prose: "packs built from policy-packs-internal, i.e. the ones we ship to customers", treating one condition as two. hitrust-awsnative satisfied the first and not the second, and /api/orgs/{org}/policypacks — the endpoint this script already reads — returns products and privately published packs indistinguishably, so nothing caught it.

Per @danbiwer, the registry listing does carry the distinction, in source:

{ "source": "private", "publisher": "pulumi", "name": "approved-component-versions-bad", ... }
{ "source": "pulumi",  "publisher": "pulumi", "name": "aws-organizations-tag-policies",  ... }

fetch-policy-packs.js now requires every allowlisted pack to come back from /api/registry/policypacks?orgLogin={org} with source: "pulumi", and fails naming any that don't along with their actual source. Verified against those real records, including both failure modes behind this incident: a privately published pack, and a pack absent from the listing entirely (which is hitrust-awsnative's state now).

Two notes for whoever touches this next, both recorded in comments:

  • Not publisher. It's "pulumi" for everything in our org, so filtering on it would admit the private packs too — it just looks like the right field.
  • source is set by an admin command, not by whoever publishes, so an engineer testing something can't set it by accident. That's what makes it safe to fail a build on, per @jkodroff's question in Slack.

The check fails closed: an unreadable or changed response stops the job rather than falling back to publishing unverified pages.

Allowlist audit

data/policy_packs.yaml now documents 22 packs. Everything else policy-packs-internal carries stays out, and the new check enforces the last row rather than trusting a comment:

Pack Why it stays out
cmmc-azure Empty scaffold — index.ts is ~135 lines of comments and no policies; publish fails [400] Policy Pack must have at least one policy. Never published.
cmmc-google-cloud Same — empty scaffold, same 400.
cis-kubernetes-self-hosted Same — export const selfHostedK8sPolicies = [] under a TODO list. Never published.
aws-config Not in the root workspaces array, so changesets never versions it and the publish workflow can't see it. package.json still says "name": "aws-typescript", v0.0.1, no CHANGELOG. A WIP port of the AWS Config ruleset per its own CLAUDE.md.
hitrust-awsnative Published privately to the org, never a product. Since deleted.

The first four were visible from the repo. The fifth wasn't, which is the whole point of §3.

Verification

node scripts/lint/lint-markdown.js and prettier --check pass. Every added reference link resolves against the allowlist, and the allowlist, data/policy_pack_policies/, and data/policy_pack_lastmod.json agree on all 22 packs with no orphans either way. The registry check's parsing and gate logic were exercised against @danbiwer's real records; the live call itself is unrun here, since both endpoints need a token this environment doesn't have. Hugo isn't installed either, so make build wasn't run — the content changes are prose and links only.

Known follow-up, not in this PR

Several pages still carry the old framework list and will read as incomplete once this lands: the "Policy as code" row across content/docs/iac/comparisons/*.md, and content/what-is/what-is-policy-as-code.md (L199). Left out to keep this diff reviewable.

Separately, pulumi/policy-packs-internal#211 records four packs that failed to publish in the 2026-07-09 batch and were never retried, one being the shipped aws-organizations-tag-policies. Unrelated to this diff. Worth noting the record above shows that pack at version: 1.0.0 while the repo is at 2.0.1 — if that listing is live, the published version lags further than #211 estimates, and that issue needs correcting.

The pre-built packs table and the pages that point at it were written when
ISO 27001, NIST, and PCI DSS shipped for fewer clouds than they do today, and
were never refreshed as coverage grew. The generated reference pages under
/docs/reference/pre-built-policy-packs/ (driven by data/policy_packs.yaml) have
been correct all along, so the summary surfaces were the only thing telling
readers we ship less than we do.

Reconciled against data/policy_packs.yaml and data/policy_pack_policies/:

- ISO/IEC 27001:2022 — listed as AWS-only; we ship AWS, Azure, and Google Cloud
  (238 + 158 + 153 = 549 policies).
- PCI DSS v4.0.1 — listed as AWS-only; we ship all three clouds.
- NIST SP 800-53 — listed as AWS and Google Cloud; we also ship Azure.
- CMMC 2.0 (AWS) — missing from the table entirely.
- HITRUST CSF — missing its AWS Native (aws-native provider) pack.

Also added ISO 27001 and CMMC to the framework lists on the Policies overview,
the policy packs overview, the Insights landing page, and the onboarding guide,
and filled in the missing packs on the per-cloud AWS, Azure, and Google Cloud
integration pages.

Every link added was checked against the allowlist that generates those pages.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BvCEyksviZ5M9vNaZvAsdz
@CamSoper
CamSoper marked this pull request as ready for review August 21, 2026 20:33
@github-actions github-actions Bot added review:triaging Claude Triage is currently classifying the PR domain:docs PR touches technical docs and removed review:triaging Claude Triage is currently classifying the PR labels Aug 21, 2026

@unblocked unblocked Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No issues found

About Unblocked

Unblocked has been set up to automatically review your team's pull requests to identify genuine bugs and issues.

📖 Documentation — Learn more in our docs.

💬 Ask questions — Mention @unblocked to request a review or summary, or ask follow-up questions.

👍 Give feedback — React to comments with 👍 or 👎 to help us improve.

⚙️ Customize — Adjust settings in your preferences.

@github-actions github-actions Bot added the review:in-progress Claude review is currently running label Aug 21, 2026
@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Pre-merge Review — Last updated 2026-08-24T21:44:57Z

Tip

Summary: A docs accuracy PR that widens the advertised coverage of Pulumi's pre-built compliance policy packs, now carrying a second, infra-shaped change: cd00d9a2 turns THE RULE in data/policy_packs.yaml from prose into an enforced gate, requiring every allowlisted pack to come back from /api/registry/policypacks?orgLogin=pulumi with source: "pulumi". The content half is unchanged and still clean — all nine newly linked pack pages resolve against the allowlist, and data/policy_packs.yaml is now 22 packs with 22 matching data files. The wrongness that would block the new half is a gate that fires on packs that are products (taking out the nightly sync and, with it, every future policy-pack update) or one that silently passes on a partial read. Against your explicit ask on the unrun live call: I fetched the published Pulumi Cloud OpenAPI spec — the same one scripts/fetch-openapi-spec.sh builds the REST API reference from — and it pins the response shape you said you couldn't confirm. That answers question 1 concretely and turns up one thing the two pasted records couldn't show. On question 3: publisher is the right field to avoid, the comment explaining why is well-placed, and I have nothing to add.

Review confidence:

Dimension Level Notes
mechanics HIGH
facts MEDIUM Repo data verifies which packs are built; it can't verify which are shipped — the gap that produced the AWS Native error.
code correctness MEDIUM The live registry call is unrun (no token here); checked against the published OpenAPI spec instead, which pins the envelope but not the org's actual data.
cross-sibling consistency HIGH
Investigation log
  • Cross-sibling reads: 3 of 3 siblings
  • External claim verification: 17 of 25 claims verified (2 unverifiable, 5 contradicted) · 4 specialists (numerical, cross-reference, capability, framing); 0 cross-specialist corroborations · routed: 3 inline, 17 Pass 1, 2 Pass 2 (verified 0, contradicted 1, unverifiable 1), 3 Pass 3 (verified 3, contradicted 0, unverifiable 0).
  • Cited-claim spot-checks: not run (no cited claims)
  • Frontmatter sweep: ran on body + meta_desc
  • Temporal-trigger sweep: ran (recency words present in diff; spot-check in-review)
  • Code execution: not run (no static/programs/ change)
  • Code-examples checks: not run (no fenced code blocks in content files)
  • Editorial-balance pass: not run (not under content/blog/)
🚨 Outstanding ⚠️ Low-confidence 💡 Pre-existing ✅ Resolved
3 1 2 1

🔍 Verification trail

25 claims extracted · 17 verified · 2 unverifiable · 5 contradicted
  • L23 in content/docs/administration/get-started/setting-up-for-success.md "The infrastructure hosting Pulumi Cloud aligns with IT security standards including SOC 1/SSAE 16/ISAE 3402, SOC 2, SOC 3, FISMA, FedRAMP, DOD SRG Levels 2…" → ✅ verified (evidence: (escalated from pass1) The live Pulumi docs page states verbatim: "The infrastructure hosting Pulumi Cloud aligns with IT security standards including SOC 1/SSAE 16/ISAE 3402, SOC 2, SOC 3, FISMA, FedRAMP, DOD SRG Levels 2 and 4, PCI DSS…; source: https://www.pulumi.com/docs/administration/onboarding-guide/setting-up-for-success/)
  • L23 in content/docs/administration/get-started/setting-up-for-success.md "Pulumi Cloud is AWS-reviewed for compliance best practices." → ❌ contradicted (framing: Source only supports "SOC 2 Type II certified"; claim adds an unsupported "AWS-reviewed for compliance best practices" assertion not found in the cited source.; evidence: The cited source (/security/) states only: "The Pulumi platform employs industry best practices for security and is SOC 2 Type II certified." It makes no mention of Pulumi Cloud being "AWS-reviewed for compliance best practices," and the…; source: content/security/_index.md; intuition: The compliance list (FedRAMP, ITAR, DOD SRG, MTCS, etc.) reads like AWS's own infrastructure compliance page, not…)
  • L25 in content/docs/administration/get-started/setting-up-for-success.md "Users can write custom Pulumi Policies for their specific industry or enterprise requirements." → ✅ verified (evidence: Pulumi's own policy docs confirm this: "Need custom policies? Learn to write custom policy packs in TypeScript, JavaScript, Python, or OPA (Rego). Create organization-specific rules tailored to your requirements." This directly supports…; source: content/docs/insights/policy/_index.md)
  • L25 in content/docs/administration/get-started/setting-up-for-success.md "Pulumi Policies includes hundreds of out-of-the-box policies for AWS, Azure, Google Cloud, and Kubernetes." → ✅ verified (framing: Source lists the frameworks/providers covered by pre-built packs; claim's "hundreds" figure is a reasonable aggregate given the breadth (9 frameworks x up to…; evidence: The linked page (/docs/insights/policy/policy-packs/pre-built-packs/) confirms Pulumi Cloud ships pre-built policy packs for CIS, CIS Kubernetes, CMMC, HITRUST, ISO 27001, NIST, PCI DSS, and Pulumi Best Practices, each covering AWS…; source: repo:content/docs/insights/policy/policy-packs/pre-built-packs.md)
  • L27 in content/docs/administration/get-started/setting-up-for-success.md "Pulumi Policies can be configured at warning or error levels." → ❌ contradicted (framing: shifted — source defines levels as advisory/mandatory/remediate/disabled; claim substitutes 'warning or error' which are not the actual named enforcement…; evidence: Pulumi's own docs (content/docs/insights/policy/policy-packs/authoring.md) define enforcement levels as "advisory", "mandatory", "remediate", or "disabled" — e.g. "The enforcement level can be 'advisory', 'mandatory', 'remediate', or…; source: repo:content/docs/insights/policy/policy-packs/authoring.md; intuition: Claim uses generic "warning/error" terminology instead of Pulumi's actual named enforcement levels…)
  • L27 in content/docs/administration/get-started/setting-up-for-success.md "Pulumi Policies can be applied flexibly across projects, for example so that GDPR rules only apply to infrastructure in European regions." → ✅ verified (framing: Source establishes general per-stack/per-account scoping of policy packs; the GDPR/European-regions example is a specific instantiation of that general…; evidence: Pulumi's own Policy Groups docs confirm the underlying mechanism: "Policy groups organize one or more policy packs and apply them to specific stacks or cloud accounts. They determine when and where policies are enforced across your…; source: repo:content/docs/insights/policy/policy-groups.md)
  • L27 in content/docs/administration/get-started/setting-up-for-success.md "Pulumi Policies can be applied flexibly across projects, for example so that GDPR rules apply only to infrastructure in European regions." → ✅ verified (framing: Source describes general capability of scoping policy packs to stacks/accounts and authoring custom policies against any resource property; the…; evidence: Pulumi's own policy docs confirm the underlying capability: "Policy groups organize one or more policy packs and apply them to specific stacks or cloud accounts. They determine when and where policies are enforced across your…; source: repo:content/docs/insights/policy/policy-groups.md and repo:content/docs/insights/policy/_index.md)
  • L73 in content/docs/insights/_index.md "Pulumi Insights provides ready-made (pre-built) compliance policy packs for the ISO 27001 standard requiring no code." → ✅ verified (evidence: The Pre-built Policy Packs reference page lists "ISO/IEC 27001:2022" as a supported framework with packs for AWS, Azure, and Google Cloud: "Enforces ISO/IEC 27001:2022 Annex A controls across multiple cloud providers, helping…; source: repo:content/docs/insights/policy/policy-packs/pre-built-packs.md)
  • L54 in content/docs/insights/policy/_index.md "Individual Pulumi Policies validate infrastructure configuration, for example enforcing that VMs must use approved instance types." → ➖ not-a-claim (evidence: Line 54 itself states: "Policies are individual rules that validate infrastructure configuration (e.g., ... 'VMs must use approved instance types')." This is a descriptive/illustrative example of the author's own documented concept…; source: repo:content/docs/insights/policy/_index.md)
  • L55-56 in content/docs/insights/policy/_index.md "Pulumi Policy groups let users enforce stricter policies in production and more permissive policies in development environments." → ✅ verified (framing: Source describes the general per-environment-tier pattern (advisory vs mandatory) enabled by policy groups; claim states this as the capability policy groups…; evidence: The sibling Policy Groups page confirms this exact usage pattern: "the usual way to express this is with a separate policy group for each environment tier: one group covering lower-environment stacks where the packs are advisory, and…; source: repo:content/docs/insights/policy/policy-groups.md)
  • L118 in content/docs/insights/policy/_index.md "Pre-built Pulumi policy packs can be enabled directly from Pulumi Cloud with no code required." → 🤝 matches (evidence: The sibling page content/docs/insights/policy/policy-packs/_index.md states the identical claim about the same linked page: "Pre-built policy packs ... You enable them from Pulumi Cloud without writing any code." The claim under review…; source: repo:content/docs/insights/policy/policy-packs/_index.md)
  • L27 in content/docs/insights/policy/policy-packs/_index.md "Pulumi's pre-built policy packs cover common compliance frameworks, including CIS, PCI DSS, HITRUST, NIST, ISO 27001, and CMMC." → ✅ verified (evidence: The sibling page content/docs/insights/policy/policy-packs/pre-built-packs.md lists exactly these pre-built frameworks in its "Available policy packs" table: CIS 8.1, CIS Kubernetes, CMMC 2.0, HITRUST CSF 11.5, ISO/IEC 27001:2022, NIST…; source: repo:content/docs/insights/policy/policy-packs/pre-built-packs.md)
  • L29 in content/docs/insights/policy/policy-packs/_index.md "Users can test a custom policy pack locally with pulumi preview --policy-pack before publishing it to Pulumi Cloud." → ✅ verified (evidence: The auto-generated CLI reference for pulumi preview documents --policy-pack strings Run one or more policy packs as part of this update, confirming users can run/test a policy pack locally with this flag before publishing it to…; source: repo:content/docs/iac/cli/commands/pulumi_preview.md)
  • L39 in content/docs/insights/policy/policy-packs/pre-built-packs.md "Pulumi provides a pre-built CMMC 2.0 policy pack that supports AWS." → ✅ verified (framing: Source confirms CMMC is a pre-built framework and that pre-built packs generally support AWS/Azure/GCP; claim narrows this to 'CMMC pack supports AWS'…; evidence: (escalated from pass1) Pulumi's Policy Packs overview page lists CMMC among the pre-built compliance frameworks: "If you enable CIS, PCI DSS, NIST, HITRUST, ISO 27001, CMMC, or Pulumi Best Practices, every machine that runs pulumi…; source: https://www.pulumi.com/docs/insights/policy/policy-packs/)
  • L39 in content/docs/insights/policy/policy-packs/pre-built-packs.md "The CMMC 2.0 policy pack enforces CMMC 2.0 practices for AWS resources, helping defense-industrial-base organizations meet Department of Defense…" → ✅ verified (framing: Source confirms CMMC exists as a pre-built pack category; claim's specific framing about DIB organizations/DoD requirements is standard/accurate description…; evidence: (escalated from pass1) Pulumi's policy packs documentation confirms CMMC is one of the pre-built compliance frameworks Pulumi maintains alongside CIS, PCI DSS, NIST, HITRUST, and ISO 27001: "If you enable CIS, PCI DSS, NIST, HITRUST, ISO…; source: https://www.pulumi.com/docs/insights/policy/policy-packs/)
  • L40 in content/docs/insights/policy/policy-packs/pre-built-packs.md "The HITRUST CSF 11.5 pack is available for AWS, Azure, and Google Cloud." → ✅ verified (evidence: after the 93d5904d removal the row links exactly three packs, matching the three hitrust entries in data/policy_packs.yaml (slugs aws, azure, google-cloud) and the three remaining data files hitrust-{aws,azure,google-cloud}.json; no aws-native reference survives anywhere in the repo; source: repo:data/policy_packs.yaml, repo:data/policy_pack_policies/)
  • L40-43 in content/docs/insights/policy/policy-packs/pre-built-packs.md "The ISO/IEC 27001:2022 policy pack enforces ISO/IEC 27001:2022 Annex A controls across multiple cloud providers, helping organizations align their cloud…" → 🤷 unverifiable (evidence: The claim text matches the ISO/IEC 27001:2022 row in pre-built-packs.md, which links to /docs/reference/pre-built-policy-packs/iso-27001/{aws,azure,google-cloud}/ — not the HITRUST source_hint…; source: repo:content/docs/insights/policy/policy-packs/pre-built-packs.md (line 41); attempted gh pr view 211 -R pulumi/policy-packs-internal (repo not found/inaccessible); intuition: source_hint for this claim points to a HITRUST page, not the ISO-27001 page the claim text actually describes …)
  • L80-81 in content/docs/integrations/clouds/azure/_index.md "There exists a pre-built policy pack named 'NIST 800-53 for Azure' located at /docs/reference/pre-built-policy-packs/nist/azure/." → ✅ verified (evidence: The Azure integrations page lists "NIST 800-53 for Azure" under Policy packs, matching the sibling AWS page's identical pattern ("[NIST 800-53 for…; source: content/docs/integrations/clouds/azure/_index.md (L80) and content/docs/integrations/clouds/aws/_index.md (L89), cross-referenced; pulumi/policy-packs-internal repo not accessible via gh)
  • L83 in content/docs/integrations/clouds/azure/_index.md "There exists a pre-built policy pack named 'ISO/IEC 27001 for Azure' located at /docs/reference/pre-built-policy-packs/iso-27001/azure/." → ✅ verified (evidence: The data file data/policy_pack_policies/iso-27001-azure.json exists and contains policies whose framework.name is "ISO/IEC 27001" (version 2022), targeting Azure resources (Azure AD custom roles, RoleAssignment, etc.), matching the doc's…; source: repo:data/policy_pack_policies/iso-27001-azure.json)
  • L75-76 in content/docs/integrations/clouds/gcp/_index.md "Pulumi provides a pre-built policy pack implementing NIST 800-53 for Google Cloud." → ✅ verified (evidence: The GCP integrations page lists "NIST 800-53 for Google Cloud" alongside other pre-built policy packs (CIS, PCI DSS, HITRUST, ISO 27001), and the sibling AWS page shows the…; source: content/docs/integrations/clouds/gcp/_index.md (L75); content/docs/integrations/clouds/aws/_index.md (L89) as sibling-consistency corroboration)
  • L78 in content/docs/integrations/clouds/gcp/_index.md "Pulumi provides a pre-built policy pack implementing ISO/IEC 27001 for Google Cloud." → ✅ verified (framing: Claim directly restates the linked doc title/existence; corroborated by consistent sibling-page pattern across cloud providers.; evidence: The GCP integrations page lists "ISO/IEC 27001 for Google Cloud" alongside other pre-built policy packs (CIS, NIST 800-53, PCI DSS, HITRUST), consistent with the sibling…; source: content/docs/integrations/clouds/gcp/_index.md L78; content/docs/integrations/clouds/aws/_index.md L93 (sibling pattern))
  • L156-165 in scripts/fetch-policy-packs.js "The registry listing's envelope key isn't pinned, so accept a bare array, policyPacks, or items." → ❌ contradicted (evidence: the published Pulumi Cloud OpenAPI spec defines GET /api/registry/policypacksListPolicyPacksResponse, whose only properties are policyPacks (an array of RegistryPolicyPack, and the schema's sole required member) and continuationToken ("can be used to fetch the next page of results. If nil, there are no more results available."). The envelope IS pinned; items is not a shape the API defines, and the paging the code ignores is documented; source: https://api.pulumi.com/api/openapi/pulumi-spec.json — the same spec scripts/fetch-openapi-spec.sh builds /docs/reference/cloud-rest-api/ from)
  • L166-172 in scripts/fetch-policy-packs.js "If the listing cannot be read or does not look the way it did above, the job stops [with the shape error]." → ❌ contradicted (evidence: the guard is !rows.some((r) => typeof r?.source === "string"), which is satisfied by a single conforming row out of any number. If source is renamed or dropped for this org's records while one legacy row still carries it, products comes back empty, the shape error never fires, and the allowlist error throws instead — naming all 22 documented packs as "not published Pulumi products"; source: repo:scripts/fetch-policy-packs.js L166-172, L206-218)
  • L177 in scripts/fetch-policy-packs.js "Every pack in data/policy_packs.yaml is returned by the registry listing with source: \"pulumi\"." → 🤷 unverifiable (evidence: both endpoints require a token unavailable here. Neither pasted record is an allowlisted pack: aws-organizations-tag-policies (the sole source: "pulumi" sample) is a deliberate exception at data/policy_packs.yaml:256, and approved-component-versions-bad (the source: "private" sample) is on the do-not-document list at :271. The spec's own field description reads "Source indicates where this policy pack is hosted (e.g., "private", "pulumi"). Currently, only "private" policy packs are supported."; source: repo:data/policy_packs.yaml, https://api.pulumi.com/api/openapi/pulumi-spec.json#/components/schemas/RegistryPolicyPack)
  • L254 in data/policy_packs.yaml "Every pack that policy-packs-internal builds AND publishes to the pulumi org now has a page above, with two deliberate exceptions:" → ❌ contradicted (evidence: three exceptions are listed beneath it — aws-organizations-tag-policies, cis-kubernetes-google-cloud, and hitrust-awsnative. On master the same sentence sits above two entries and is correct; 93d5904d added the third without updating the count; source: repo:data/policy_packs.yaml L254-267 vs. origin/master:data/policy_packs.yaml L246-252)

🚨 Outstanding in this PR

These must be resolved or refuted before merging.

  • [L156-165] scripts/fetch-policy-packs.js"The envelope key isn't pinned here -- only the record shape above is confirmed -- so accept a bare array or the usual wrappers." To your first question — yes, pin one shape, and the API pins it for you. The published Pulumi Cloud OpenAPI spec (https://api.pulumi.com/api/openapi/pulumi-spec.json, the same document scripts/fetch-openapi-spec.sh renders the REST API reference from) defines GET /api/registry/policypacks as returning ListPolicyPacksResponse:

    {
      "properties": {
        "continuationToken": { "type": "string",
          "description": "ContinuationToken can be used to fetch the next page of results.\nIf nil, there are no more results available." },
        "policyPacks": { "type": "array", "items": { "$ref": "#/components/schemas/RegistryPolicyPack" } }
      },
      "required": ["policyPacks"]
    }

    policyPacks is the envelope and it is required; items is not a shape the API defines. The tolerance itself is harmless, but it's covering for the wrong unknown — the listing is paginated, and the code reads page one and stops. A first page that doesn't carry all 22 allowlisted packs makes products a partial set, and every off-page pack falls into the "not published Pulumi products" error as (source: absent from the listing) — a hard nightly failure pointing the on-call at the allowlist when the allowlist is fine. That's the one failure mode fail-closed doesn't protect you from, because it's indistinguishable from a true positive. Note also that the documented query parameters are only access and orgLogin — there is no documented way to request page two — so detect-and-stop is the whole fix, and it's consistent with the design you already chose:

        const body = await fetchJSON(`/api/registry/policypacks?orgLogin=${encodeURIComponent(org)}`);
        // ListPolicyPacksResponse: { policyPacks: RegistryPolicyPack[], continuationToken?: string }.
        const rows = body?.policyPacks;
        if (!Array.isArray(rows)) {
            throw new Error(
                `could not read the registry policy pack listing for the "${org}" org: expected a\n` +
                    `       "policyPacks" array. The API shape may have changed -- see the comment above\n` +
                    `       fetchRegistryProducts in this file.`,
            );
        }
        // The response pages, and no documented query parameter asks for page two. A partial
        // read would silently shrink `products` and fail packs that are perfectly fine, so stop.
        if (body.continuationToken) {
            throw new Error(
                `the registry policy pack listing for the "${org}" org is paginated (continuationToken\n` +
                    `       present) and this script only reads the first page. Teach it to follow the token\n` +
                    `       before trusting the result.`,
            );
        }
    

    The record shape you verified is spec-confirmed, for what it's worth: RegistryPolicyPack lists both name and source as required.

  • [L166-172] scripts/fetch-policy-packs.js — the shape guard doesn't hold the line the comment above it promises. rows.some((r) => typeof r?.source === "string") passes on one conforming row out of any number, so a rename or removal of source for this org's records — with a single legacy row still carrying it — sails through, products comes back empty, and the error that actually throws is the allowlist one, naming all 22 documented packs as "not published Pulumi products". Whoever gets the Slack page reads that as "someone documented 22 private packs," which is the most alarming possible misdiagnosis of an upstream schema change. Cheap fix — an empty product set against a non-empty listing is a shape problem, never an allowlist problem:

        if (rows.length && !products.size) {
            throw new Error(
                `the registry listing for the "${org}" org returned ${rows.length} record(s) but not one\n` +
                    `       with source: "pulumi". That is far more likely a change to the API's "source" field\n` +
                    `       than 22 privately published packs -- see the comment above fetchRegistryProducts.`,
            );
        }
    

    Same neighborhood, one line: at L209, nonProducts.set(row.name, row.source) stores undefined for a row that's present but carries no source, and nonProducts.get(p) ?? "absent from the listing" then reports that pack as absent when it isn't. Storing row.source ?? "(no source field)" keeps the two cases distinguishable in the error text.

  • [L254] data/policy_packs.yaml"Every pack that policy-packs-internal builds AND publishes to the pulumi org now has a page above, with two deliberate exceptions:" — three are listed beneath it now. 93d5904d added the hitrust-awsnative entry without updating the count; the sentence is correct on master, where it sits above two. Small, but this file is the thing the PR is promoting to enforced-rule status, so its own bookkeeping should be right:

    # Every pack that policy-packs-internal builds AND publishes to the `pulumi` org now
    # has a page above, with three deliberate exceptions:
    

⚠️ Low-confidence

Review each and resolve as appropriate — these don't block the PR.

  • [L177] scripts/fetch-policy-packs.jsnothing available here shows that an allowlisted pack comes back source: "pulumi", and that's the assumption the whole gate rests on. Both of @danbiwer's records validate the discriminator nicely, but neither is a pack this file documents: aws-organizations-tag-policies — the only source: "pulumi" sample — is one of the deliberate exceptions at data/policy_packs.yaml:256, and approved-component-versions-bad is on the do-not-document list at :271. So the evidence covers the excluded set and not the included one. Sharpening it rather than just noting it: the spec's own description of the field reads

    Source indicates where this policy pack is hosted (e.g., "private", "pulumi").
    Currently, only "private" policy packs are supported.

    The live record showing source: "pulumi" beats stale spec prose, so I don't read this as "the gate is wrong" — but it does mean the value the gate requires is undocumented behavior, which can change without anyone upstream considering it a break. Combined with the fact that the first run of this check will be an unattended 07:30 UTC nightly, one curl against /api/registry/policypacks?orgLogin=pulumi with a token, confirming that (say) cis-aws and hitrust-aws come back source: "pulumi", would retire this entirely. Worth pasting the count of returned records too — it's what settles the pagination question above.

    On your second question, the fail-closed tradeoff: it reads right, and the workflow already earns it. The gate runs before any fetch, so a failure costs a sync rather than publishing a page; data/policy_pack_policies/*.json is only ever written by this script, so a blocked run means _content.gotmpl finds no data and skips the page with a warnf rather than rendering a stub; and the notify job posts to #docs-ops on failure, so a red nightly isn't silent. One property worth naming, which predates this commit rather than arriving with it: fail-closed guards adding a page, not retracting one. A pack that loses product status keeps its already-committed JSON and its live public page for as long as the nightly stays red — exactly the shape of the incident this PR is fixing. The old published.get(name) throw behaved the same way, so it isn't a regression, just the thing to remember when triaging the Slack alert: the sync stopping does not mean the page came down.

    Separately, and the reason I'd want that curl rather than taking it on trust: I can't find the unit tests. grep -rl fetchRegistryProducts matches only the script, nothing in the diff adds a test file, and scripts/run-unit-tests.sh runs yarn --cwd components test and nothing else — there's no harness covering scripts/*.js at all. If those tests exist locally, they're worth committing (they'd have caught both findings above); if standing one up is out of scope for this PR, that's a fine answer, but then the live call is the only evidence that will ever exist for this parser.

📋 Triaged verifier findings

I double-checked these and realized they weren't real findings — click to expand
  • [L40-43] content/docs/insights/policy/policy-packs/pre-built-packs.md"The ISO/IEC 27001:2022 policy pack enforces ISO/IEC 27001:2022 Annex A controls across multiple cloud providers…" — verdict: unverifiable. Mis-sourced: the check followed a hint pointing at the HITRUST page rather than the ISO 27001 one, and then tried a private repo it couldn't reach. Against the actual source of truth the widened "multiple cloud providers" wording is correct: data/policy_packs.yaml defines iso-27001 packs for aws, azure, and google-cloud, and all three data files (iso-27001-aws.json, iso-27001-azure.json, iso-27001-google-cloud.json) are present.

💡 Pre-existing issues in touched files (optional)

  • [L23] content/docs/administration/get-started/setting-up-for-success.md"Pulumi Cloud is SOC 2 Type II certified and AWS-reviewed for compliance best practices." Pre-existing: this sentence is a context line that this PR doesn't modify — the only edit in this file is on L25. (The acd985ff merge moved the file here from onboarding-guide/; the line is unchanged, one line lower.) Worth a separate fix, though: Pulumi Security supports "SOC 2 Type II certified" but says nothing about an AWS review, and the long standards list that follows (FedRAMP, ITAR, DOD SRG, MTCS…) describes the compliance posture of the hosting infrastructure, not of Pulumi Cloud itself. Consider dropping the unsupported half:

    Modern enterprises face rigorous compliance requirements. Pulumi Cloud is SOC 2 Type II certified. The infrastructure hosting Pulumi Cloud aligns with IT security standards including SOC 1/SSAE 16/ISAE 3402, SOC 2, SOC 3, FISMA, FedRAMP, DOD SRG Levels 2 and 4, PCI DSS Level 1, EU Model Clauses, ISO 9001/27001/27017/27018, ITAR, IRAP, FIPS 140-2, MLPS Level 3, and MTCS. Learn more at [Pulumi Security](/security/).
    
  • [L27] content/docs/administration/get-started/setting-up-for-success.md"Configure it at warning or error levels, and apply it flexibly across projects…" Pre-existing: also an untouched context line, but "warning" and "error" aren't Pulumi's enforcement levels. Authoring policy packs names them advisory, mandatory, remediate, and disabled, so a reader who searches the UI for "warning" finds nothing. Suggested rewrite of that sentence:

    Pulumi Policies identifies issues in existing cloud infrastructure and prevents new problems from being introduced. Configure each policy as advisory, mandatory, or remediate, and apply policies flexibly across projects—for example, GDPR rules might only apply to infrastructure in European regions. Pulumi Policies also features automatic remediations.
    

Separately, and outside this PR's scope: several other pages still carry the pre-correction framework list this PR is fixing, and will read as incomplete once these changes land — content/docs/iac/comparisons/terraform/_index.md (L54) and the parallel "Policy as code" table row in the other content/docs/iac/comparisons/*.md pages ("CIS, HITRUST, NIST, and PCI DSS"), and content/what-is/what-is-policy-as-code.md (L199, "Pre-built compliance packs (CIS, NIST, PCI DSS, HITRUST)"). Recorded as a follow-up in the PR body. The marketing and blog pages that repeat the list are historical and don't need updating.

✅ Resolved since last review

  • [L92-94] content/docs/integrations/clouds/aws/_index.md"HITRUST CSF for AWS Native — for the AWS Cloud Control (aws-native) provider." — removed in 93d5904d, along with the table row in pre-built-packs.md, the hitrust-awsnative entry in data/policy_packs.yaml, its policy data file, and its lastmod entry; an S3 redirect now sends the retired public URL to the HITRUST AWS page. Verified: no aws-native/awsnative HITRUST reference survives anywhere in the repo, the redirect matches the source-path|destination-url format of its neighbors in scripts/redirects/insights-policy-redirects.txt, and the remaining three HITRUST links resolve against the allowlist.

    concede: my triage of this finding was wrong. The previous review moved the verifier's ❌ contradicted verdict into 📋 Triaged as Spurious, reasoning that the pack was defined in data/policy_packs.yaml with a backing data file, so the link resolved. That reasoning was sound and still wrong: it established that the pack is built, which this repo can show, and treated that as establishing it is shipped, which this repo cannot show. @danbiwer's confirmation that the pack is private is exactly the evidence the allowlist can't carry, and 93d5904d closes the gap for the next reader by amending THE RULE in data/policy_packs.yaml to say so explicitly and recording the pack in the do-not-document list. Worth noting for the facts confidence dimension above: repo-grounded verification of pack links has a ceiling here, and "the data file exists" is not sufficient evidence that a pack is customer-facing.

📜 Review history

  • 2026-08-21T20:46:19Z — All ten newly linked pre-built policy pack pages verified against data/policy_packs.yaml; no blockers. Two verifier findings triaged as spurious/mis-sourced, and two pre-existing inaccuracies noted on untouched lines of setting-up-for-success.md. (69af652)
  • 2026-08-24T16:37:34Z — Re-reviewed after fix push (2 new commits, 93d5904). acd985ff merged master, which renamed setting-up-for-success.md into get-started/; the branch's edit survived the rename and the two pre-existing findings were re-anchored to L23/L27 at the new path. 93d5904d removed the HITRUST AWS Native pack; re-verified the removal is complete across content, data, and redirects, and moved the previously-triaged [L92-94] finding to ✅ Resolved with a concession — the verifier's original contradicted verdict was correct and the triage that overruled it confounded "built in policy-packs-internal" with "shipped to customers". facts confidence downgraded from HIGH to MEDIUM to reflect that limit. Claim set now 21: the AWS Native claim's line no longer exists, replaced by a new check that the HITRUST row's three remaining links match the allowlist. 0 outstanding.
  • 2026-08-24T21:44:57Z — Re-reviewed after fix push (1 new commit, cd00d9a), which brings scripts/fetch-policy-packs.js into the diff and opens the infra lane for the first time on this PR. Nothing outstanding was disputed and nothing needed re-triage; the content half is unchanged and data/policy_packs.yaml reads 22 packs against 22 data files, matching @CamSoper's note — no claim in this review depends on the earlier 23-pack state. Since the live registry call can't run without a token, I verified the new parser against the published Pulumi Cloud OpenAPI spec (https://api.pulumi.com/api/openapi/pulumi-spec.json, fetched at review time — the same document scripts/fetch-openapi-spec.sh renders /docs/reference/cloud-rest-api/ from). That resolved the envelope question the commit left open — ListPolicyPacksResponse requires policyPacks and carries a continuationToken, so the listing pages and items is not a defined shape — and surfaced that the only documented query parameters are access and orgLogin, with no way to request a second page. Three new 🚨 findings: the unhandled pagination (a partial first page fails legitimate packs with an error that reads like a true positive), the .some() shape guard that lets schema drift throw the allowlist error instead of the shape error, and a stale "two deliberate exceptions" count in data/policy_packs.yaml introduced by 93d5904d. One ⚠️: neither pasted record is an allowlisted pack — aws-organizations-tag-policies is a documented exception and approved-component-versions-bad is on the do-not-document list — so no evidence here shows a documented pack returning source: "pulumi", and the spec's field description still claims only "private" is supported. Answered @CamSoper's three questions in the findings: pin policyPacks (question 1, the spec pins it); fail-closed reads right and the #docs-ops notify job earns it, with the caveat that it guards adding a page and not retracting one (question 2); and the publisher reasoning is correct as written and documented in the right place (question 3). Claim set now 25. code correctness added at MEDIUM. Also could not locate the unit tests the mention describes — no test file in the diff, no reference to fetchRegistryProducts outside the script, and scripts/run-unit-tests.sh covers only components. (cd00d9a)

  • Refresh this review — comment @claude #update-review. Say what you fixed, or which finding you dispute and why; both work in the same mention.
  • Ask for anything else — comment @claude with no hashtag (questions, one-off fixes). Leaves this review untouched.

Important

Please don't hide, resolve, or delete this comment! It breaks things!

📖 How pre-merge review works — the full lifecycle, short-circuits, and escape hatches.

@github-actions github-actions Bot added review:no-blockers Claude review completed cleanly; outstanding is empty and removed review:in-progress Claude review is currently running labels Aug 21, 2026
- [NIST 800-53 for AWS](/docs/reference/pre-built-policy-packs/nist/aws/)
- [PCI DSS for AWS](/docs/reference/pre-built-policy-packs/pci-dss/aws/)
- [HITRUST CSF for AWS](/docs/reference/pre-built-policy-packs/hitrust/aws/)
- [HITRUST CSF for AWS Native](/docs/reference/pre-built-policy-packs/hitrust/aws-native/) — for the AWS Cloud Control (`aws-native`) provider.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't actually published. It exists in our repo privately. I noticed it's appearing in references, too. Would you mind removing that in this PR?

I think some docs automation might have picked it up @jkodroff

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch (sorry for the Claude-speak). I'll hit you up on Slack to figure out the source of truth on what should actually be published.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 93d5904 — removed from the table, this page, and data/policy_packs.yaml, which is what was generating the reference page. Also dropped the fetched policy data and its lastmod entry, and added an S3 redirect from /docs/reference/pre-built-policy-packs/hitrust/aws-native/ to the HITRUST AWS page, since the old URL is live today.

On how it got there, since it's relevant to the source-of-truth question: data/policy_packs.yaml is a hand-maintained allowlist, and its rule read "only document packs that are built from the policy-packs-internal repo, i.e. the ones we ship to customers" — treating those two as one condition. hitrust-awsnative satisfies the first and not the second, and nothing available to the docs side distinguishes them: it's built there, it published cleanly in the 2026-07-09 batch, and the Pulumi Cloud API returns it like any other pack, which is how the nightly fetch picked up 114 policies for it. So the automation wasn't working from a bad signal — it was working from the only signal it has, which doesn't carry the private/public bit at all.

I've reworded the rule as two independent conditions and recorded the exclusion at the bottom of that file, so an audit that diffs the org listing against the repo doesn't re-add it. But that's a comment telling a human to go ask, not a check — if there's a durable way to mark a pack private in policy-packs-internal (a private: true in its package.json, a naming convention, anything the fetch script could read), that'd be a much better fix than trusting the next person to read a comment. Happy to wire that up on the docs side once you and @jkodroff land on what the source of truth should be.

Worth a look while you're in there: the same batch had four packs fail to publish and never get retried, one of them aws-organizations-tag-policies v2.0.1 — pulumi/policy-packs-internal#211. Found by an agent, unverified by a human, so treat it accordingly.


Generated by Claude Code

claude added 2 commits August 24, 2026 16:25
Upstream restructured content/docs/administration/, which moved
setting-up-for-success.md from onboarding-guide/ to get-started/. Git
followed the rename and carried this branch's edit with it; no conflicts
to resolve by hand.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BvCEyksviZ5M9vNaZvAsdz
@danbiwer flagged in review that the HITRUST AWS Native pack is private to
policy-packs-internal and is not published to customers, and that docs
automation had generated a public reference page for it at
/docs/reference/pre-built-policy-packs/hitrust/aws-native/.

Removes it from the pre-built packs table, the AWS integrations page, and
data/policy_packs.yaml, which is what generated the reference page. Also drops
the fetched policy data and its lastmod entry so the data set stays consistent
with the allowlist.

The reference page is live today, so removing it changes a public URL: adds an
S3 redirect to the HITRUST AWS page, the nearest real equivalent.

The allowlist rule is what let this through. It said to document packs "built
from the policy-packs-internal repo, i.e. the ones we ship to customers",
treating those as the same set. They aren't: this pack is built there, publishes
cleanly, and is returned by the API, and none of that makes it customer-facing.
Restates the rule as two independent conditions, notes that neither the repo nor
the API can distinguish them, and records the exclusion at the bottom of the file
so a future audit against the org doesn't re-add it.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BvCEyksviZ5M9vNaZvAsdz
@github-actions github-actions Bot added review:stale New commits since last Claude review; refresh on next ready-transition or @claude mention and removed review:no-blockers Claude review completed cleanly; outstanding is empty labels Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

@claude #update-review

Two pushes since the last review:

  • acd985f — merged master to clear a conflict. Upstream restructured content/docs/administration/, moving setting-up-for-success.md from onboarding-guide/ to get-started/; git followed the rename and carried this branch's edit with it. Nothing resolved by hand. That also relocates the two pre-existing findings you flagged (the "AWS-reviewed" claim and the "warning or error" enforcement levels) — both are still there, still on untouched lines, now at content/docs/administration/get-started/setting-up-for-success.md.
  • 93d5904 — removed the HITRUST AWS Native pack after @danbiwer confirmed in review that it's private and not shipped to customers. Note this reverses your triage of the [L92-94] finding: the verifier called it contradicted, you (and I) overruled that on the grounds that data/policy_packs.yaml defines the pack and the data file exists — and the verifier's conclusion was right for a reason neither of us could see from this repo. The pack really is built, really does publish, and really is returned by the API; it just isn't public. Worth noting because the reasoning that overruled it looked sound and was still wrong.

The removal spans the table, the AWS integrations page, data/policy_packs.yaml, data/policy_pack_policies/hitrust-awsnative.json, and the lastmod ledger, plus an S3 redirect for the now-removed /docs/reference/pre-built-policy-packs/hitrust/aws-native/. The remaining nine added pack links are unchanged and still resolve against the allowlist.

Not disputing anything else. The out-of-scope note about content/docs/iac/comparisons/*.md and content/what-is/what-is-policy-as-code.md is recorded in the PR body as a follow-up.


Generated by Claude Code

@github-actions github-actions Bot added review:in-progress Claude review is currently running and removed review:stale New commits since last Claude review; refresh on next ready-transition or @claude mention labels Aug 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🤖 Review updated on @CamSoper's request.

@github-actions github-actions Bot added review:no-blockers Claude review completed cleanly; outstanding is empty and removed review:in-progress Claude review is currently running labels Aug 24, 2026
Comment thread data/policy_packs.yaml Outdated
# guide, not a policy listing. Stays hand-maintained.
# cis-kubernetes-google-cloud A stale earlier publish, superseded by
# cis-kubernetes-gcp. See the cis-kubernetes section.
# hitrust-awsnative Built here and resolvable through the API, but NOT a

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's resolvable through the API b/c someone published it specifically to the pulumi org. We either need an allowlist on the docs end, or a "clean" org for reading things from API endpoints.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Built the allowlist option, in cd00d9a2, using the source field you and @danbiwer landed on in Slack.

data/policy_packs.yaml was already an allowlist — it's how we document 22 of the packs that repo carries rather than all of them. What it didn't have was any check on its own entries, so a human adding a wrong row was enough. fetch-policy-packs.js now requires every entry to come back from /api/registry/policypacks?orgLogin=<org> with source: "pulumi", and fails naming the offenders and their actual source.

Verified against the two records Dan pasted, including both failure modes from this incident — a source: "private" pack, and a pack missing from the listing entirely, which is hitrust-awsnative's state now that you've deleted it.

Two things from your thread are captured as comments in the code, because both are easy to get wrong later:

  • Not publisher. It's "pulumi" for everything in our org, so filtering on it admits the private packs too. It's the more obvious-looking field, so there's a comment saying don't switch to it.
  • Your spoofing question is what made a hard failure defensible. Dan's answer — source is admin-set, not set by whoever publishes — is why the check throws rather than warns. If a passing engineer could set it, gating the build on it would be theater. That reasoning is in the comment too, so it survives.

The check fails closed: an unreadable or changed response stops the job rather than publishing unverified pages.

I couldn't exercise the live call — both endpoints need a token this environment doesn't have — so the parsing is written against Dan's records and unit-tested, and the envelope key is accepted loosely since only the record shape was confirmed. First real run will settle it, and it's on the nightly, so that's tonight.

Which brings up something time-sensitive: deleting the pack from the org means master is now broken for that job. fetch-policy-packs.js throws when an allowlisted pack isn't in the org, and master still carries the entry — so the 07:30 UTC run fails and pings #docs-ops. This PR is the fix.

One more, tangential: Dan's aws-organizations-tag-policies record reads version: 1.0.0, while the repo is at 2.0.1 and there's a GitHub release for 2.0.0. If that was a live listing rather than an illustrative paste, the published version is lagging further than pulumi/policy-packs-internal#211 estimates and I should correct that issue. If it was just a paste, ignore me.


Generated by Claude Code

@jkodroff jkodroff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, since this fixes the most important mistake, but it's not a full solution.

@CamSoper

Copy link
Copy Markdown
Contributor Author

@jkodroff I'm rolling in the allowlist idea

Turns the rule in data/policy_packs.yaml from prose into a check. `/api/orgs/<org>/
policypacks`, which this script already reads, returns everything the org holds --
products and privately published packs alike, indistinguishably. That is how the
private hitrust-awsnative pack got a public reference page (#21055).

The registry listing carries the distinction in `source`: "pulumi" for a published
product, "private" otherwise. Every allowlisted pack must now come back as a product
or the job fails naming the offenders and their actual source. Verified against real
records from @danbiwer, including the two failure modes behind this incident: a
privately published pack, and a pack absent from the listing entirely.

Deliberately not `publisher`: that is "pulumi" for everything in our org, so it would
admit private packs too. `source` is set by an admin command rather than by whoever
publishes, so it cannot be set by an engineer testing something -- which is what makes
it safe to fail the build on.

Fails closed. An unreadable or changed response stops the job rather than falling back
to publishing unverified pages.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BvCEyksviZ5M9vNaZvAsdz
@github-actions github-actions Bot added review:stale New commits since last Claude review; refresh on next ready-transition or @claude mention and removed review:no-blockers Claude review completed cleanly; outstanding is empty labels Aug 24, 2026
@CamSoper CamSoper changed the title Correct pre-built policy pack coverage in docs (ISO 27001, PCI DSS, NIST, CMMC) Correct pre-built policy pack coverage, and enforce the allowlist against the registry Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

@claude #update-review

One new commit since the last refresh request, plus scope this PR didn't have before — it now touches scripts/fetch-policy-packs.js, so the infra lane applies where it previously didn't.

cd00d9a2 — enforce the allowlist against the registry listing. data/policy_packs.yaml decides which packs get a generated reference page, but its rule was prose and nothing validated its entries. /api/orgs/<org>/policypacks, which the script already reads, returns products and privately published packs indistinguishably — that's how hitrust-awsnative got a public page. The script now additionally requires every allowlisted pack to come back from /api/registry/policypacks?orgLogin=<org> with source: "pulumi", and throws naming any that don't.

Three things worth pointing your infra checks at:

  • The live call is unrun. Both endpoints need a token this environment doesn't have. Parsing is written against two real records @danbiwer pasted in Slack and unit-tested against them; the record shape (name, source) is confirmed, the envelope key is not, so it accepts a bare array, policyPacks, or items. If you think that tolerance is wrong — that it should pin one shape and fail loudly — say so, that's a genuine judgment call I'd rather have checked.
  • It fails closed by design. Unreadable or changed response stops the nightly rather than falling back to publishing unverified pages. That's deliberate, but it does mean an upstream API change takes out the sync until someone fixes the parser. Worth confirming that tradeoff reads right to you.
  • publisher is deliberately not used. It's "pulumi" for every pack in our org, so filtering on it would admit the private ones. There's a comment saying so, since it's the field a reasonable person would reach for.

Also note this reverses your earlier triage of the [L92-94] finding, which I flagged last refresh and which now has a second-order consequence: the pack is gone from the diff entirely, and data/policy_packs.yaml is down from 23 documented packs to 22. Any claim you extract about pack counts should come from the current file, not the earlier review.

Not disputing anything outstanding. The two pre-existing findings in setting-up-for-success.md are still there, still on untouched lines, now under content/docs/administration/get-started/ after the upstream move. The out-of-scope note about content/docs/iac/comparisons/*.md and content/what-is/what-is-policy-as-code.md is recorded in the PR body as a follow-up.


Generated by Claude Code

@github-actions github-actions Bot added review:in-progress Claude review is currently running and removed review:stale New commits since last Claude review; refresh on next ready-transition or @claude mention labels Aug 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🤖 Review updated on @CamSoper's request.

@github-actions github-actions Bot added review:outstanding-issues Claude review completed; outstanding has author-actionable findings and removed review:in-progress Claude review is currently running labels Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain:docs PR touches technical docs review:outstanding-issues Claude review completed; outstanding has author-actionable findings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants