Safeguard
Application Security•

ASVS 5.0 V10.7.2: Make the Consent Screen Clear and Specific

A consent prompt must say what is being granted, to which app, and for how long. Here is what to show and how to check it.

Safeguard Security Team
2 min read

ASVS 5.0 V10.7.2 (Level 2) requires that when the authorization server asks for consent, it gives sufficient and clear information. Where it applies, that means the nature of the requested access (scopes, resource server, or Rich Authorization Request details), the identity of the application, and how long the authorization lasts.

Why it matters

A prompt that says only "Allow access?" is not consent in any meaningful sense. Users approve what they can understand, and phishing relies on vague screens.

How to implement it

Map every scope to a plain sentence and show it, along with the app, the duration and the redirect host.

SCOPE_TEXT = {
    "orders.read":  "See your orders and their status",
    "orders.write": "Create and cancel orders for you",
    "offline_access": "Stay connected until you revoke access",
}

def consent_context(client, scopes, refresh_days):
    return {
        "app_name": client.display_name,
        "verified": client.identity_assured,
        "redirect_host": urlparse(client.primary_redirect_uri).hostname,
        "permissions": [SCOPE_TEXT[s] for s in scopes],
        "duration": f"Access lasts up to {refresh_days} days unless you revoke it",
    }

Escape the app name when rendering, since it is client supplied. Fail closed on unknown scopes: refuse the request instead of showing a blank line.

How to test it

Review the consent screen for each client against the list: what, who, how long. Request a scope that has no description and confirm the request is refused. Register a client name with HTML and confirm it renders as text.

Language and accessibility

Write permission text at a plain reading level and keep it short. Put the most sensitive permissions first. Make sure the screen works with a screen reader and at narrow widths, because a prompt people cannot read is not informed consent either.

Common mistakes

  • Showing raw scope strings.
  • Hiding the lifetime.
  • Display names that imitate trusted brands, with no unverified label.

Quick check

Which three things should a prompt convey?

What access is being granted, which application is asking, and how long the authorization lasts.

Sources

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.