Safeguard
Application Security•

ASVS 5.0 V8.1.3: Document Contextual Security Attributes

ASVS V8.1.3 wants a list of the environmental signals your app uses for security decisions, such as time, location, IP and device. Write them down and own them.

Safeguard Security Team
2 min read

ASVS 5.0 V8.1.3 (Level 3) requires documentation that lists every environmental and contextual attribute the application uses in security decisions, including time of day, user location, IP address and device, for both authentication and authorization.

Why it matters

Contextual rules are easy to add and easy to forget. A geo block added during an incident can lock out a traveling executive months later, and no one knows where the rule lives. A list makes the behavior reviewable and the data collection justifiable.

How to implement it

Maintain an inventory with one row per attribute:

AttributeSourceUsed forStored?Owner
Source IPLoad balancer headerBlock known bad ranges, new IP alert90 daysplatform
CountryIP lookupStep up when it changes30 daysappsec
Device IDSigned cookieRemember trusted deviceUntil revokedidentity
Local hourServer clockAdmin actions blocked outside hoursNoappsec

Note trust issues, too. A forwarded IP header is only reliable if your proxy sets it and strips client supplied values.

How to test it

Grep the code for reads of these inputs (headers, geo libraries, device cookies) and compare against the inventory. Any attribute used but not listed is a documentation gap.

Common mistakes

  • Using an attribute in a rule and never recording it.
  • Trusting raw forwarded headers.
  • Keeping contextual data longer than the document says.

Quick check

Do I need this if I only use passwords?

If no contextual attribute influences any decision, the list is simply empty. State that explicitly.

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.