Skip to content

Guidance for sensitive form fields (credentials, card data, national IDs) in declarative and imperative tools #316

Description

@prasanna-gyde

Problem

Neither the spec nor the Chrome security guidance says how sensitive fields should be handled when a form becomes a tool. The declarative API builds inputSchema from every named control, so a checkout form exposes card number and CVV, and a login or KYC form exposes one-time codes and national ID numbers, as agent-fillable parameters.

Browser agents already treat these fields specially: Claude in Chrome, Gemini in Chrome and OpenAI's agent hand passwords, OTPs and payment details back to the user rather than passing them through the model. Tool schemas currently give them no way to know which parameters those are.

Evidence

  • PCI DSS v4.0.1 Req 3.3.1: Sensitive authentication data (CVV, PIN) must not be retained after authorization. We treat agent transcripts as retention.
  • NIST SP 800-63B, PSD2 SCA-RTS Art. 4 and RBI's 2025 authentication directions treat one-time codes as authentication factors held by the user.
  • Several jurisdictions restrict processing of national ID numbers: National laws under GDPR Art. 87, UIDAI rules for Aadhaar, and Singapore's PDPC NRIC guidelines.

In auto-webmcp (an open-source library that turns forms into WebMCP tools) we now exclude these fields from the schema, list them in the description, and set consequentialHint. Design notes: https://github.com/prasanna-gyde/auto-webmcp/blob/main/docs/design/country-packs.md

Possible directions

  1. Declarative API: By default, exclude controls whose autocomplete is cc-number, cc-csc, cc-exp*, one-time-code, current-password, new-password or webauthn from the generated schema.
  2. Signal to agents: A per-parameter hint (for example x-user-input: true, or a list on the tool) meaning "the user completes this field", so agents hand off instead of guessing or asking for the value in chat.
  3. Security considerations: A short section recommending that tool results not echo credentials, card data or hidden inputs.

Related: #110 (sensitive tool outputs; a comment there raises the input direction this issue covers) and #313.

Happy to contribute text or test cases.

Activity

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

    declarativesecurity-trackerGroup bringing to attention of security, or tracked by the security Group but not needing response.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions