|
| 1 | +<!-- SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. --> |
| 2 | +<!-- SPDX-License-Identifier: Apache-2.0 --> |
| 3 | + |
| 4 | +# Security Rubric |
| 5 | + |
| 6 | +Use these nine categories to identify security risks, controls, and evidence throughout a change. |
| 7 | +Planning names the applicable risks, trust boundaries, intended controls, and expected evidence. |
| 8 | +Implementation records the controls that changed and focused negative evidence that proves forbidden |
| 9 | +behavior remains denied. Independent review evaluates the completed change against every category. |
| 10 | + |
| 11 | +Current code, tests, workflows, and active `AGENTS.md` files remain authoritative for implementation |
| 12 | +details. This rubric owns category names, meanings, reusable questions, and evidence expectations only. |
| 13 | + |
| 14 | +## Category 1: Secrets and Credentials |
| 15 | + |
| 16 | +### Meaning |
| 17 | + |
| 18 | +Keep credentials and sensitive authentication material inside the named credential trust boundary. |
| 19 | + |
| 20 | +### Questions |
| 21 | + |
| 22 | +- Can a secret, token, password, key, certificate, connection string, or credential file enter source, |
| 23 | + configuration, logs, errors, artifacts, process arguments, or model-visible context? |
| 24 | +- Does credential flow cross a sandbox, workflow, process, provider, or repository trust boundary? |
| 25 | +- Are credentials scoped, stored, passed, rotated, and removed through the intended trusted mechanism? |
| 26 | + |
| 27 | +### Expected evidence |
| 28 | + |
| 29 | +- Positive evidence traces required credential flow through the intended credential mechanism without widening access. |
| 30 | +- Negative evidence proves credentials and representative secret values are absent or redacted at each named |
| 31 | + boundary that does not permit credential access. |
| 32 | + |
| 33 | +## Category 2: Input Validation and Data Sanitization |
| 34 | + |
| 35 | +### Meaning |
| 36 | + |
| 37 | +Treat external, user-controlled, model-controlled, repository-controlled, and cross-boundary data as |
| 38 | +untrusted until it is constrained for its exact use. |
| 39 | + |
| 40 | +### Questions |
| 41 | + |
| 42 | +- Are type, length, format, range, path, URL, host, protocol, and ownership constraints enforced before use? |
| 43 | +- Can data reach shell execution, filesystem access, parsing, rendering, network access, or policy decisions |
| 44 | + with a different interpretation than the validator used? |
| 45 | +- Can encoding, redirects, aliases, traversal, injection, or parser behavior bypass the intended constraint? |
| 46 | + |
| 47 | +### Expected evidence |
| 48 | + |
| 49 | +- Positive evidence covers accepted canonical input at the boundary that owns validation. |
| 50 | +- Negative evidence covers malformed, ambiguous, encoded, traversal, injection, and SSRF-shaped input that |
| 51 | + must be rejected without reaching the protected operation. |
| 52 | + |
| 53 | +## Category 3: Authentication and Authorization |
| 54 | + |
| 55 | +### Meaning |
| 56 | + |
| 57 | +Verify identity and permission at the trusted boundary before allowing an action or resource access. |
| 58 | + |
| 59 | +### Questions |
| 60 | + |
| 61 | +- Is authentication required before processing, and are signature, expiry, audience, issuer, and scope checked? |
| 62 | +- Is authorization enforced for the exact resource and action rather than inferred from client behavior? |
| 63 | +- Can horizontal or vertical privilege escalation bypass ownership, role, tenant, sandbox, or workflow checks? |
| 64 | + |
| 65 | +### Expected evidence |
| 66 | + |
| 67 | +- Positive evidence proves an authenticated and authorized principal can perform the intended action. |
| 68 | +- Negative evidence proves unauthenticated, expired, wrong-scope, wrong-owner, and lower-privilege principals |
| 69 | + are denied at the authoritative boundary. |
| 70 | + |
| 71 | +## Category 4: Dependencies and Third-Party Libraries |
| 72 | + |
| 73 | +### Meaning |
| 74 | + |
| 75 | +Limit supply-chain exposure to external code and artifacts required by a named consumer. Obtain them from a |
| 76 | +source accepted by repository policy and resolve them reproducibly. |
| 77 | + |
| 78 | +### Questions |
| 79 | + |
| 80 | +- Is each new dependency or downloaded artifact necessary, maintained, license-compatible, and obtained from a |
| 81 | + trusted source? |
| 82 | +- Are production versions, image digests, checksums, lockfiles, and registries constrained against substitution? |
| 83 | +- Do install hooks, transitive dependencies, generated files, or runtime loading expand execution or network trust? |
| 84 | + |
| 85 | +### Expected evidence |
| 86 | + |
| 87 | +- Positive evidence identifies the current consumer, trusted source, resolved version, integrity control, and |
| 88 | + relevant vulnerability or license assessment. |
| 89 | +- Negative evidence proves untrusted registries, floating or substituted artifacts, and unintended install or |
| 90 | + runtime execution are not accepted. |
| 91 | + |
| 92 | +## Category 5: Error Handling and Logging |
| 93 | + |
| 94 | +### Meaning |
| 95 | + |
| 96 | +Propagate security failures without exposing sensitive state, suppressing the failure, or continuing after a |
| 97 | +required control fails. |
| 98 | + |
| 99 | +### Questions |
| 100 | + |
| 101 | +- Can errors, logs, traces, diagnostics, or artifacts disclose credentials, personal data, internal paths, policy, |
| 102 | + or protected system state? |
| 103 | +- Are security failures propagated to a caller that can act, rather than suppressed, downgraded, or retried unsafely? |
| 104 | +- Can interruption or partial failure leave permissions, resources, files, credentials, or processes outside |
| 105 | + their required restrictions? |
| 106 | + |
| 107 | +### Expected evidence |
| 108 | + |
| 109 | +- Positive evidence shows actionable errors and deterministic cleanup or recovery at the owning boundary. |
| 110 | +- Negative evidence proves sensitive values are redacted and security-critical failures cannot become success, |
| 111 | + silent continuation, or unsafe partial state. |
| 112 | + |
| 113 | +## Category 6: Cryptography and Data Protection |
| 114 | + |
| 115 | +### Meaning |
| 116 | + |
| 117 | +Protect sensitive data with established protocols and algorithms appropriate to its lifetime and trust boundaries. |
| 118 | + |
| 119 | +### Questions |
| 120 | + |
| 121 | +- Is sensitive data protected in transit and at rest where required, with certificate and peer verification enabled? |
| 122 | +- Are standard current algorithms, modes, key sizes, randomness, nonce handling, and key lifecycle mechanisms used? |
| 123 | +- Is custom cryptography, obsolete hashing, reversible masking, or insecure fallback treated as protection? |
| 124 | + |
| 125 | +### Expected evidence |
| 126 | + |
| 127 | +- Positive evidence identifies the standard mechanism, protected data, trust boundary, key owner, and verification path. |
| 128 | +- Negative evidence proves plaintext, invalid peers, weak algorithms, reused nonces, insecure fallback, and unintended |
| 129 | + data retention are rejected where applicable. |
| 130 | + |
| 131 | +## Category 7: Configuration and Security Headers |
| 132 | + |
| 133 | +### Meaning |
| 134 | + |
| 135 | +Make deployed defaults restrictive. Prevent configuration from weakening required process, container, browser, |
| 136 | +and network controls. |
| 137 | + |
| 138 | +### Questions |
| 139 | + |
| 140 | +- Do defaults minimize privileges, capabilities, ports, filesystem access, network egress, origins, and debug exposure? |
| 141 | +- Can environment variables, manifests, headers, policy merges, images, or runtime overrides disable a required control? |
| 142 | +- Are container users, image provenance, CORS, CSP, TLS, file modes, and policy precedence appropriate to the surface? |
| 143 | + |
| 144 | +### Expected evidence |
| 145 | + |
| 146 | +- Positive evidence proves the restrictive default and the final effective configuration at the boundary that |
| 147 | + enforces each required control. |
| 148 | +- Negative evidence proves omitted, malformed, permissive, conflicting, and override configurations fail closed |
| 149 | + or preserve every required control. |
| 150 | + |
| 151 | +## Category 8: Security Testing |
| 152 | + |
| 153 | +### Meaning |
| 154 | + |
| 155 | +Keep automated evidence that allowed behavior succeeds and forbidden behavior remains denied at the boundary |
| 156 | +that enforces the control. |
| 157 | + |
| 158 | +### Questions |
| 159 | + |
| 160 | +- Does coverage include malicious input, boundary values, unauthorized actions, bypass attempts, and prior regressions? |
| 161 | +- Does the test include the component that enforces the control, or does mocking bypass that component? |
| 162 | +- Does the change remove, weaken, skip, or make nondeterministic existing security evidence? |
| 163 | + |
| 164 | +### Expected evidence |
| 165 | + |
| 166 | +- Positive evidence exercises authorized behavior at the narrowest boundary that includes the enforcing component. |
| 167 | +- Negative evidence exercises representative attacks and forbidden actions against the component that enforces the |
| 168 | + control. Use runtime or E2E evidence when process, sandbox, container, filesystem, workflow, or network enforcement |
| 169 | + is the behavior under test. |
| 170 | + |
| 171 | +## Category 9: System Security |
| 172 | + |
| 173 | +### Meaning |
| 174 | + |
| 175 | +Preserve the security of the whole state transition when individually valid checks interact across time, concurrency, |
| 176 | +recovery, composition, or trust boundaries. |
| 177 | + |
| 178 | +### Questions |
| 179 | + |
| 180 | +- Does the change weaken, duplicate, bypass, reorder, or move an existing control away from its authoritative boundary? |
| 181 | +- Can TOCTOU, concurrency, retries, stale state, recovery, fallback, alternate entry points, or partial rollout bypass checks? |
| 182 | +- Does least privilege hold for code, services, workflows, sandboxes, users, and data throughout the complete operation? |
| 183 | + |
| 184 | +### Expected evidence |
| 185 | + |
| 186 | +- Positive evidence traces the complete security-relevant state transition and identifies the authoritative control at each |
| 187 | + trust-boundary crossing. |
| 188 | +- Negative evidence covers bypass routes, races, stale or partial state, recovery and fallback paths, and composition with |
| 189 | + adjacent controls without replacing required real-system validation. |
0 commit comments