Skip to content

Preview generated audit output #1056

Open
Open

Description

@ChristianPavilonis

Description

Add a read-only preview of the artifacts that ts audit generate <url> would propose. Today, ts audit page <url> collects a page and prints URL, title, script count, resource count, and warnings; it does not show proposed trusted-server.toml values or summarize js-assets.toml. ts audit generate already has analysis and draft-building logic but writes selected artifacts by default.

Proposed behavior

Have ts audit page reuse the relevant generation analysis so its human-readable output previews the main configuration values and a compact JavaScript asset summary. It should not create or overwrite either output file. Keep the page audit's existing URL and warning information and distinguish observed evidence from inferred configuration values. Decide how to handle generation-only options that are absent from ts audit page before sharing code.

Done when

  • ts audit page reports the proposed configuration fields and JavaScript asset summary for a representative collected page.
  • Running the command creates or changes neither trusted-server.toml nor js-assets.toml.
  • Shared analysis produces consistent values in page and generate for the same input and options, including missing/partial evidence.
  • Output remains readable and safely escapes page-controlled text; CLI tests cover the preview and no-write behavior.

Related

CLI audit tracker #1055.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions