docs: clarify allow_insecure hardening guidance - #2636
docs: clarify allow_insecure hardening guidance#2636Ching Wei Kang (WilliamK112) wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Enterprise Security guide to clarify how allow_insecure hardening works in practice, and to align the “Recommended hardening” checklist with the actual enforcement boundary (runtime gates vs. policy engine).
Changes:
- Adds an explanation of the policy boundary around
allow_insecureand how dependency allow/deny lists are intended to apply. - Adds a restrictive
dependencies.allowexample in the HTTP (insecure) dependencies section. - Rewords the hardening checklist item to point readers to the runtime gates section.
Suppressed comments (1)
docs/src/content/docs/enterprise/security.md:137
- The canonicalization example appears inverted for policy matching: policy allow/deny lists are evaluated against the host-blind canonical dependency string, so
http://mirror.example.com/contoso/toolswould canonicalize tocontoso/toolsand would matchcontoso/**. Policy therefore cannot distinguish mirror hostname or HTTP vs HTTPS; only the runtimeallow_insecure+--allow-insecuregates are scheme-aware.
For example, `http://mirror.example.com/contoso/tools` canonicalizes to
`mirror.example.com/contoso/tools`, so it does not match this allow list. If a
mirror's canonical host path is allowed, policy accepts that identity for both
HTTP and HTTPS. The manifest and CLI approvals above remain the scheme-aware
HTTP controls. `registry_source.allow_non_registry` is a separate,
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Thanks for flagging the canonicalization example. I rechecked it against the current source and existing regression test. |
Description
Clarify the security guide's
allow_insecurehardening advice so it matchesthe implemented policy boundary.
This change:
apm-policy.ymlhas no dedicatedallow_insecurekey;repository refs;
dependencies.allowexample and documents its limits;registry_source.allow_non_registryfrom HTTP Git transport;Fixes #2346
Type of change
Testing
Validation performed:
npm run test:links(14 tests passed)npm run build(123 pages built; 969 relative links checked)git diff --checkSpec conformance (OpenAPM v0.1)