[Documentation] `allow_insecure` discrepancy in `Recommended hardening`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.9k
- Forks
- 365
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 132
Description
Hello, I've been looking at some of the documentation around the security model for apm and noticed a discrepancy in the Recommended hardening section related to allow_insecure.
TL;DR
The apm docs and source code agree on the mechanics. There is no dedicated
policy key for insecure transport; the docs' recommended hardening leans on
the general dependency allow list. The one soft discrepancy is that the docs
imply a policy-level control that the source only implements indirectly.
What the source code shows
allow_insecureis a per-dependency manifest key inapm.yml
(boolean), defined indocs/.../reference/manifest-schema.md:427.- Enforcement is a two-gate model in
src/apm_cli/install/insecure_policy.py:
an HTTP dep is allowed only if both (1) the dep entry has
allow_insecure: trueand (2) the install runs with--allow-insecure. - The policy engine (
src/apm_cli/policy/) contains zero references to
"insecure". Transport security is enforced in the install pipeline, not the
policy layer. allow_non_registry(underregistry_source) is a separate, experimental
control governing source routing (registry vs. git/local), unrelated to
http://transport. Requiresapm experimental enable registries.
What the documentation says
- Recommended hardening (
enterprise/security.md:491), verbatim:"Forbid
allow_insecure: truevia the policy allow list, except where an
air-gapped mirror demands it."
The discrepancy
| Aspect | Documentation | Source code |
|---|---|---|
Where to forbid allow_insecure |
"via the policy allow list" | No dedicated policy key exists |
| Mechanism | Implies a policy-level control | Only the general dependencies.allow/deny glob list applies |
| Concrete syntax | No literal YAML example given | Must exclude HTTP mirrors by omitting them from allow globs |
The docs phrase it as though a purpose-built anti-insecure toggle exists at the
policy layer. In reality, the only lever is the general dependency allow/deny
glob list: because it matches a host-blind, scheme-blind canonical ref
(owner/repo), an http:// mirror simply fails to match a vetted glob and is
blocked as a side effect — not through any allow_insecure-aware policy check.
Practical takeaway
- You cannot block insecure deps with a policy key like
allow_insecure: false. - You cannot rely on
allow_non_registry: falsefor it either (separate axis,
experimental).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with enterprise/security.md around line 491 and compare its Recommended hardening wording with docs/.../reference/manifest-schema.md:427 and src/apm_cli/install/insecure_policy.py. Update the documentation so it does not imply a dedicated policy key or confuse allow_non_registry with transport security. Done means the documented control matches the two-gate behavior and general dependency allow/deny mechanism.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation, security
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 84/100