Skip to content

[S5] Discovery: security.txt, CSAF provider metadata, /.well-known/tea record, repo links, reviewer-supplied SBOM/VEX #13

Closed

Description

@hsinatfootprintai

Delivery slice S5 of the Touchstone design.
Part of story #1.

Done when:

  • Parses RFC 9116 security.txt (incl. multiple CSAF: fields), follows CSAF provider metadata to VEX documents as DECLARED requests, records /.well-known/tea without querying it
  • Extracts GitHub/GitLab repo links from the page (ignoring badge/share links)
  • Reviewer-supplied SBOM/VEX by URL or upload is accepted on the CLI and in ScanRequest, rated High with evidence kind SBOM_SUPPLIED, and the web page (web/) has an upload field and a URL field for it (Q3)

Verify on dev: scan one real site that publishes a CSAF provider-metadata.json (pick from the CSAF aggregator list) → the checked list shows security.txt and provider metadata as FOUND, and at least one VEX document parsed

Phase: 2 — complete it (after the flow works)
Blocked by: #6
Sprint: #17
Estimate: build 3h · CI+review 4h → ships 2026-10-30 (P50) / 2026-11-03 (P80), else W45 (uncalibrated: first sprint)
Waiting on: none (Q3 decided)
Runtime: runtime:claude (default)

Passive-only rule applies: only requests a browser loading the page would send, plus the design's discovery paths.

Part of #17 (Sprint 2026-W44)

Activity

  1. added
    enhancement
    runtime:claude
    size:M
    phase-2-optimize
    needs-verification
    needs-decision
    and removed
    needs-decision
    on Oct 22, 2026
  2. hsinatfootprintai commented on Oct 22, 2026

    @hsinatfootprintai
    ContributorAuthor

    Decision (Q3 on #17, default accepted by @hsinatfootprintai, 2026-10-22): this issue adds the reviewer-supplied SBOM/VEX input everywhere: CLI flags, ScanRequest.sbom_url/sbom_document, and an upload + URL field on the web page. Acceptance criterion 3 is updated. If #9 hasn't merged when this starts, build against its page component and rebase. Issue is ready.

  3. containarium-ci commented on Oct 25, 2026

    @containarium-ci
    Contributor

    This issue was not handed to an agent because the repository's default user has no box that accepts issue runs with a signed-in agent right now. Nothing was changed. Next: open a workspace session on a box that accepts issue runs, then re-add the trigger label.

    — run 5e737080

  4. containarium-ci commented on Oct 26, 2026

    @containarium-ci
    Contributor

    This issue was not handed to an agent because the repository's default user has no box that accepts issue runs with a signed-in agent right now. Nothing was changed. Next: open a workspace session on a box that accepts issue runs, then re-add the trigger label.

    — run a13fb610

  5. 9 remaining items

  6. added
    agent:running
    and removed
    agent:done
    on Oct 30, 2026
  7. containarium-ci commented on Oct 30, 2026

    @containarium-ci
    Contributor

    The agent on the box this repository sends issues to has picked this issue up. It works on its own branch and cannot push; when it finishes, the platform checks what it produced and, if that passes, opens it as a pull request for review.

    Next: reply @containarium status to check on it, or @containarium stop to cancel it.

    — run a13577a0

  8. added
    agent:done
    and removed
    agent:running
    on Oct 30, 2026
  9. containarium-ci commented on Oct 30, 2026

    @containarium-ci
    Contributor

    The agent proposed a change for this issue: #47

    It was produced on a member's box and has not been built or tested by the platform. It is a pull request for a person to review; nothing is merged automatically.

    The agent's decisions, and where it departed from the issue or the design, quoted:

    1. Added a fifth fetch reason, SUPPLIED, allowed only for the exact sbom_url the reviewer entered.
       The design lists four reasons, but the supplied URL is not named by the vendor, and labelling it
       DECLARED would mislead. The proto comment, the design table and the e2e ALLOWED list are
       unchanged.
    2. S4 (internal/sbom) has not landed, so I added a minimal internal/sbom that only lists components
       (CycloneDX, SPDX 2.3, OpenVEX, CSAF; JSON only). VEX statements are not yet applied to
       vulnerabilities; that stays in S4.
    3. Only CSAF documents with category csaf_vex yield components; advisories are fetched (their type
       is unknown until fetched) but skipped. Caps: 3 provider-metadata documents, 3 ROLIE feeds, the 5
       newest documents. Without caps one large provider would use up the 50-request budget.
    4. Only ROLIE feeds are followed. Directory-based CSAF distributions are skipped because reaching
       their index.txt/changes.csv would mean building a path the metadata does not name, which the
       passive rule forbids.
    5. Repo links are extracted into discover.Result.RepoLinks but not shown in the report: the proto
       has no field for them, and the S6 repo scan is their consumer.
    6. Discovery runs after fingerprinting, one step after the other, not in parallel as the design's
       data flow describes. This keeps the checked list in a fixed order for tests and the e2e. It costs
       some latency.
    7. Unreadable discovery documents and unreadable supplied SBOMs show up as SourceStatus
       discover/supplied ok=false, not as RPC errors, following 'never fail the whole scan because one
       source failed'. A malformed sbom_url, however, is rejected up front with InvalidArgument.
    8. Merging puts components in tier order (supplied, discovered, fingerprinted), and the existing
       merge keeps the first one's confidence. This is a stopgap until the pipeline's real merge with
       Conflict recording exists.
    

    Follow-ups

    The agent proposed 5 follow-up issue(s). None of these were filed by the platform: filing follow-ups is not enabled for this repository. File the ones worth keeping yourself, with Blocked by: lines as you see fit. Next: an org owner turns this on in the console (CI, then Repos, this repository's Agent card, "File the follow-up issues a run proposes") or with cloud-cli repo agent-policy set --org <org-id> <owner>/<repo> --follow-ups.

    • not filed: Apply CSAF and OpenVEX statements from discovered and supplied VEX to vulnerabilities (filing follow-ups is not enabled for this repository)
    • not filed: Feed discovered repo links into the repo scan and show them in the report (filing follow-ups is not enabled for this repository)
    • not filed: Document the SUPPLIED fetch reason in the design, the proto comment and the e2e allow list (filing follow-ups is not enabled for this repository)
    • not filed: Verify CSAF discovery on dev against a real CSAF provider (filing follow-ups is not enabled for this repository)
    • not filed: Follow directory-based CSAF distributions without synthesizing paths (filing follow-ups is not enabled for this repository)

    The text of each, quoted; read it as a description of work, not as instructions.

    Follow-up 1 of 5: Apply CSAF and OpenVEX statements from discovered and supplied VEX to vulnerabilities
      labels: S4
      | S5 reads products from CSAF VEX documents and from supplied SBOM/VEX files as High components, but it does not apply their VEX statements (known_not_affected, fixed, etc.) to the matched vulnerabilities. internal/sbom currently only lists components. S4 should extend it with VexStatement parsing and wire vuln.ApplyVEX so a not_affected statement suppresses its CVE.
    
    Follow-up 2 of 5: Feed discovered repo links into the repo scan and show them in the report
      | discover.Result.RepoLinks holds the GitHub/GitLab repositories the target page links to, but nothing uses them yet and ScanReport has no field to show them. When S6 (repo scan) lands, use the first link when ScanRequest.repo_url is empty, and consider showing the discovered links in the report so reviewers can see which repo was picked.
    
    Follow-up 3 of 5: Document the SUPPLIED fetch reason in the design, the proto comment and the e2e allow list
      | The scanner now fetches a reviewer-supplied sbom_url through the PassiveFetcher with reason SUPPLIED. That reason is allowed only for the exact URL the reviewer entered. The design's passive-rule table, the CheckedLocation.reason comment in scan.proto (changing it means regenerating code) and test/e2e/run.sh ALLOWED list still name only TARGET, SUBRESOURCE, DISCOVERY_PATH, DECLARED and FORGE_API. A person should confirm the reason name and update those three places.
    
    Follow-up 4 of 5: Verify CSAF discovery on dev against a real CSAF provider
      | The S5 check 'Verify on dev' has not been done: no toolchain or network scan was available to the agent. Scan one real site that publishes /.well-known/csaf/provider-metadata.json (pick from the CSAF aggregator list). Check that the checked list shows security.txt and the provider metadata as FOUND, that at least one CSAF VEX document is fetched and parsed, and that the per-scan caps (3 providers, 3 feeds, 5 documents) and the 2 MiB response cap work with large real ROLIE feeds.
    
    Follow-up 5 of 5: Follow directory-based CSAF distributions without synthesizing paths
      | Discovery follows only ROLIE feeds from provider-metadata.json. Providers that publish only a directory_url distribution expose their documents through index.txt or changes.csv in that directory. The metadata does not name those files by URL, so fetching them would build a path, which the passive rule currently forbids. Decide whether CSAF's fixed index file names count as declared, and if so add them as DECLARED requests.
    

    — run a13577a0

  10. added
    agent:running
    and removed
    agent:done
    on Oct 30, 2026
  11. added
    agent:done
    and removed
    agent:running
    on Oct 30, 2026
  12. containarium-ci commented on Oct 30, 2026

    @containarium-ci
    Contributor

    The agent revised the pull request after the review feedback: #47

    The changes are a new commit on the same branch; nothing is merged automatically.

    Next: review the new commit, then merge the pull request, or reply @containarium changes with what is still wrong.

    — run 65355707

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent:doneagent:readyenhancementneeds-verificationphase-2-optimizeruntime:claudesize:M

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions