Skip to content

Add draft project security threat-model document#13293

Open
potiuk wants to merge 5 commits into
apache:mainfrom
potiuk:asf-security/draft-threat-model-2026-05-30
Open

Add draft project security threat-model document#13293
potiuk wants to merge 5 commits into
apache:mainfrom
potiuk:asf-security/draft-threat-model-2026-05-30

Conversation

@potiuk

@potiuk potiuk commented May 30, 2026

Copy link
Copy Markdown
Member

Summary

This PR adds an initial draft of a project-level security
threat-model document (draft-THREAT-MODEL.md) so that automated
security scanners running against this repository have a
maintainer-facing reference for which classes of findings are
in-scope vs. out-of-scope for the project.

The document follows the rubric format used by several other ASF
projects piloting improved security-model discoverability for
agentic scanners. Every claim carries a provenance tag:

  • (documented) — paraphrased from public artefacts (this repo or
    the project website), cited inline.
  • (inferred) — synthesised from code structure or domain
    knowledge; the PMC has not confirmed.
  • (maintainer) — confirmed by a CloudStack PMC member in response
    to this draft. (Zero in this initial draft.)

Draft stats:

  • ~88 documented claims
  • ~64 inferred claims (each maps to a §14 question)
  • 38 open questions for maintainers in §14

§14 is the highest-leverage section: answering each question
either promotes one (inferred) tag to (maintainer) or corrects
the underlying claim.

Why "draft-" prefix?

The file is named draft-THREAT-MODEL.md rather than
SECURITY-THREAT-MODEL.md because this is a proposal for the
PMC to review — please correct, reject, or discuss as needed.

Once the PMC ratifies (or substantially edits) the content, the
file can be renamed in a follow-up PR and a discoverability
scaffold (AGENTS.mdSECURITY.md → the model) added so
scanners can mechanically follow the chain.

What this is, and what it is not

This is not a security audit. It is a working triage document
— the reference a triager holds against an inbound report to
decide whether the report is about a CloudStack vulnerability or
about caller misuse / operator misconfiguration / an out-of-scope
concern.

The draft was generated by an automated agentic security scan
being piloted by the ASF Security team; the discoverability work
is independent of any specific scan run.

How to review

  1. §14 first. Each answer either confirms one (inferred) tag or
    replaces the inferred claim with the correct one.
  2. After that, please skim §3 (out-of-scope) and §13 (triage
    dispositions) — those govern how a vulnerability report would
    be triaged.

Reply edits / corrections inline on the PR, or to the original
security@apache.org thread, whichever fits the PMC's workflow.

🤖 Generated with Claude Code

Adds a draft project-level security threat-model document
(draft-THREAT-MODEL.md) at repo root, improving discoverability
for automated security scanners running against this repository.
The file follows the rubric format used by several other ASF
projects piloting security-model discoverability.

The "draft-" prefix signals this is a proposal for the PMC to
review, correct, or reject — not a finalised maintainer-blessed
model. Every claim carries a provenance tag (documented /
inferred / maintainer) so reviewers can see where each claim
originates; §14 collects open questions for the maintainers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented May 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 18.76%. Comparing base (7308dad) to head (dcc71cd).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #13293      +/-   ##
============================================
+ Coverage     18.10%   18.76%   +0.65%     
- Complexity    16752    17974    +1222     
============================================
  Files          6037     6160     +123     
  Lines        542796   552571    +9775     
  Branches      66456    67346     +890     
============================================
+ Hits          98291   103705    +5414     
- Misses       433460   437459    +3999     
- Partials      11045    11407     +362     
Flag Coverage Δ
uitests 3.53% <ø> (+0.01%) ⬆️
unittests 19.96% <ø> (+0.68%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Markdown / typos / table-shape fixes per the CI lint output.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@yadvr yadvr requested review from DaanHoogland and vishesh92 June 1, 2026 07:16
@yadvr

yadvr commented Jun 1, 2026

Copy link
Copy Markdown
Member

There's a lot of details in the draft that needs a better set of eyes, so assigning @DaanHoogland @vishesh92 who're also PMC leads on the work.

Comment thread draft-THREAT-MODEL.md Outdated
Comment thread draft-THREAT-MODEL.md Outdated
Comment thread draft-THREAT-MODEL.md Outdated
Comment thread draft-THREAT-MODEL.md Outdated
Comment thread draft-THREAT-MODEL.md Outdated
Comment thread draft-THREAT-MODEL.md Outdated
Comment thread draft-THREAT-MODEL.md Outdated
Comment thread draft-THREAT-MODEL.md Outdated
Comment thread draft-THREAT-MODEL.md Outdated
Comment thread draft-THREAT-MODEL.md Outdated
Comment thread draft-THREAT-MODEL.md Outdated
Comment thread draft-THREAT-MODEL.md Outdated
Comment thread draft-THREAT-MODEL.md Outdated
Comment thread draft-THREAT-MODEL.md Outdated
Comment thread draft-THREAT-MODEL.md Outdated
Comment thread draft-THREAT-MODEL.md Outdated
@potiuk

potiuk commented Jun 2, 2026

Copy link
Copy Markdown
Member Author

Thanks @DaanHoogland @yadvr @vishesh92 — agreed, let's make this (apache/cloudstack) the canonical project-level threat model and have the client/tooling repos inherit from it rather than each carrying a full copy.

Concretely, mirroring what we've done for other multi-repo PMCs:

  • apache/cloudstack/THREAT_MODEL.md is the single source of truth for the project-wide model: scope, trust boundaries, the management-server adversary model, in/out-of-scope classes, known non-findings, and triage dispositions.
  • The satellite repos (cloudstack-go, -cloudmonkey, -terraform-provider, -kubernetes-provider) get a short discoverability pointer — AGENTS.mdSECURITY.md → this model — plus, only where it adds something, a thin repo-specific addendum (e.g. the Go SDK's own input-trust surface) that references the parent instead of duplicating it.

So let's converge here first. None of the satellite PRs are merged, so re-pointing them to reference this model once its shape is settled is cheap — I'll repurpose those into pointer PRs (or close + reopen) once you're happy with the parent.

On "the fields we need": that's exactly the §14 "Open questions" section — each is a proposed answer for you to confirm, correct, or strike, grouped into waves so you can take a few at a time. Drop answers inline or here and I'll fold them in and promote the provenance tags. Happy to adjust the section set if CloudStack's shape calls for it.

potiuk added a commit to potiuk/cloudstack-go that referenced this pull request Jun 2, 2026
…po copy

Drop the standalone draft-THREAT-MODEL.md and wire the discoverability chain
AGENTS.md -> SECURITY.md -> the project-wide model in apache/cloudstack
(apache/cloudstack#13293), so scanners find one canonical model and this repo
inherits it rather than duplicating it.

Generated-by: Claude Code
potiuk added a commit to potiuk/cloudstack-cloudmonkey that referenced this pull request Jun 2, 2026
…po copy

Drop the standalone draft-THREAT-MODEL.md and wire the discoverability chain
AGENTS.md -> SECURITY.md -> the project-wide model in apache/cloudstack
(apache/cloudstack#13293), so scanners find one canonical model and this repo
inherits it rather than duplicating it.

Generated-by: Claude Code
potiuk added a commit to potiuk/cloudstack-terraform-provider that referenced this pull request Jun 2, 2026
…po copy

Drop the standalone draft-THREAT-MODEL.md and wire the discoverability chain
AGENTS.md -> SECURITY.md -> the project-wide model in apache/cloudstack
(apache/cloudstack#13293), so scanners find one canonical model and this repo
inherits it rather than duplicating it.

Generated-by: Claude Code
potiuk added a commit to potiuk/cloudstack-kubernetes-provider that referenced this pull request Jun 2, 2026
…po copy

Drop the standalone draft-THREAT-MODEL.md and wire the discoverability chain
AGENTS.md -> SECURITY.md -> the project-wide model in apache/cloudstack
(apache/cloudstack#13293), so scanners find one canonical model and this repo
inherits it rather than duplicating it.

Generated-by: Claude Code
Comment thread draft-THREAT-MODEL.md Outdated
@potiuk

potiuk commented Jun 4, 2026

Copy link
Copy Markdown
Member Author

Thanks @DaanHoogland and @vishesh92 — pushed a revision folding the review in:

  • Global-setting names corrected to the real ones (enforce.post.requests.and.timestamps, proxy.header.verify / proxy.header.names / proxy.cidr, ca.framework.cert.management.custom.san, user.password.encoders.order + .exclude with their defaults) and struck the non-existent ones I'd guessed (api.signature.version, auth.password.algorithm, hash.user.password, post.requests.and.timestamps.enforced, the forward-header variants).
  • ca.plugin.root.auth.strictness: documented as default-true on new setups, false only on pre-Aug-2017 upgrades (PR CLOUDSTACK-9993: Securing Agents Communications #2239).
  • Mgmt server modeled as single-instance or clustered; cloudstack-agent per hypervisor host (dropped the wrong Hyper-V-as-agent label); system VMs at the agent trust tier.
  • Download links documented as unauthenticated UUID symlinks via Apache httpd, removed after a period (timed availability = the mitigation) — BY-DESIGN.
  • noVNC noted as a vendored fork of novnc/novnc with CloudStack changes.

Two things I captured in-model as PMC follow-ups rather than acting on: the download-token timed-removal behavior ("make sure/test this"), and the absence of a vendored-dependency update procedure. The remaining §14 questions are the open ones for the PMC to walk. WDYT?

@potiuk

potiuk commented Jun 5, 2026

Copy link
Copy Markdown
Member Author

Thanks @DaanHoogland and @vishesh92 — all 17 threads are folded in; resolving them now. What changed / was confirmed:

  • Config-setting names corrected (vishesh92): proxy.header.verify / proxy.header.names / proxy.cidr, enforce.post.requests.and.timestamps, user.password.encoders.order (+.exclude), ca.framework.cert.management.custom.san, and ca.plugin.root.auth.strictness (default true for new setups; false only on pre-Aug-2017 upgrade). Dropped api.signature.version (not in code).
  • Secondary-storage download links (§6/§11a): UUID-named symlinks, no auth on the link, removed after a window → BY-DESIGN (timed-availability mitigation); a non-removed or guessable link is VALID-HARDENING. Noted your "re-test in code" point + Daan's "why didn't static analysis catch this" as a scan-agent note.
  • noVNC (§3/§11a): vendored fork, bugs go upstream; recorded there's no automated dependency-update procedure today and the PMC would like one.
  • Deployment shape: single management-server or clustered — both supported (your wording).
  • §14 Q1–Q7 + Q12 now resolved/struck per your confirmations.

Two items are PMC follow-ups, not model changes: (a) re-test/confirm the download-link TTL in code, (b) establish a dependency-update procedure for noVNC. The model is the PMC's to merge whenever — thanks for the thorough review.

Comment thread draft-THREAT-MODEL.md Outdated
Comment thread draft-THREAT-MODEL.md Outdated
Comment thread draft-THREAT-MODEL.md Outdated
Comment on lines +961 to +965
**Q9.** Guest VM workloads — confirm that hypervisor-mediated side
channels and resource-exhaustion-within-allocation are out of scope, and
that the in-scope orchestration concerns are limited to "did CloudStack
place the VM in the right VLAN / apply the right security group / route
the right IP" (proposed)? *(maps to §3 item 5, §7, §9)*

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sound right.
IMO, the only scenario where it would be a cloudstack problem will be if cloudstack is setting wrong/bad settings while launching the guest VM or some other action which results in the corresponding issues with hypervisor. In this scenario, CloudStack needs to ensure it's using correct/secure settings for the hypervisor.
@DaanHoogland What do you think?

Comment thread draft-THREAT-MODEL.md
Comment on lines +972 to +976
**Q11.** Confirm the unsupported-component list: `tools/marvin/`,
`test/`, `developer/`, `quickcloud/`, `cloud-cli/`,
`tools/{devcloud4,devcloud-kvm,appliance,checkstyle,transifex,bugs-wiki,...}`,
`simulator` hypervisor plugin. Anything to add or remove? *(maps to §3
item 7)*

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DaanHoogland do you think we need to include simulator & tools/appliance?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to exclude them and make that explicit. Later we might want to create tooling with the express purpose of checking security but let’s leave oit out of scope for now.

Comment thread draft-THREAT-MODEL.md Outdated
Comment thread draft-THREAT-MODEL.md Outdated
Comment on lines +986 to +989
**Q18.** 2FA — proposed: off by default, operator turns it on per
domain / per user via `enable.2fa.*`. Confirm; and is "2FA disabled in
production" a §10 violation or a deployment choice? *(maps to §5a,
§10)*

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, this is a deployment choice. The correct global settings for this are:
enable.user.2fa - default is false. Determines whether two factor authentication is enabled or not. This can also be configured at domain level.
mandate.user.2fa - default is false. Determines whether to make the two factor authentication mandatory or not. This setting is applicable only when enable.user.2fa is true. This can also be configured at domain level.

Comment thread draft-THREAT-MODEL.md Outdated
Comment thread draft-THREAT-MODEL.md
Comment on lines +1002 to +1007
**Q20.** Integration API port `:8096` — proposed: closed (port-zero) by
default in production packaging, open only when explicitly configured;
when open, it is unauthenticated by design. A report of "integration
port allows admin commands without auth" is `OUT-OF-MODEL:
non-default-build` *if* the operator opened it, else `VALID`. Confirm
the default. *(maps to §5a, §10, §11a)*

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default should be 0 (disabled). But I need to confirm this.
@DaanHoogland any idea about this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it is set to 0 and only in test configurations it is set to 8096.

@potiuk

potiuk commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

Thanks @vishesh92 — this is exactly the input the §14 questions were after; folding all of it in. How each lands:

  • Root admin (L959) — confirmed trusted operator with direct access anyway → stays out of the adversary model (§7); promoting (inferred)(maintainer).
  • userdata (L970) — confirmed: the end user customizing their own guest OS → tenant-controlled data inside their own boundary, not a CloudStack-side injection surface (§6/§9).
  • Hypervisor settings (L965) — narrowing the in-model case to "CloudStack applies a wrong/insecure setting when launching/managing the guest" (a CloudStack responsibility); the hypervisor's own hardening stays out. Left flagged for @DaanHoogland.
  • proxy.header.verify (L984) — corrected: default false; only when the remote address is in proxy.cidr does CloudStack read proxy.header.names. Fixing §5a/§6.
  • 2FA (L989) — confirmed deployment choice: enable.user.2fa (default false) + mandate.user.2fa (default false), domain-configurable → "2FA not enforced" is operator config, not a flaw (§10/§11a), with those exact knob names.
  • Password hashing (L1000) — the clincher for the §11a non-finding: default encode set excludes MD5,LDAP,PLAINTEXT (effective PBKDF2,SHA256SALT,SAML2), so md5/plaintext hashing of new passwords in a default install is out of model. I'll cite the exact default-vs-excluded set.

Two still on @DaanHoogland: L976 (whether simulator + tools/appliance are in scope — I'd lean out, dev/test paths) and L1007 (the default-0/disabled confirm).

I'll push the updated model with the confirmed items folded in. Thanks again — this is the review that makes it usable for triage.

Promotes six §14 questions from proposed to maintainer-confirmed per
vishesh92's inline answers (apache#13293):

- Q8 root admin: confirmed trusted operator (direct access anyway) ->
  OUT-OF-MODEL: equivalent-harm (§3 item 4, §7).
- Q9 guest/hypervisor: side channels + in-allocation exhaustion out of
  scope; one in-model case is CloudStack applying wrong/insecure
  hypervisor settings (Daan to confirm boundary).
- Q10 userdata: end-user guest-OS customization, tenant-controlled data
  in their own boundary, not a CloudStack injection surface.
- Q17 proxy headers: proxy.header.verify default false; proxy.header.names
  read only when Remote_Addr in proxy.cidr.
- Q18 2FA: corrected the stale setting names to the real ones -
  enable.user.2fa + mandate.user.2fa (both default false, domain-
  configurable); 2FA-off is a deployment choice, not a §10 violation.
- Q19 password encoders: greenfield md5/plaintext hashing is
  OUT-OF-MODEL: non-default-build; effective set PBKDF2,SHA256SALT,SAML2.

Clears the pending-Q18/Q19 notes in §10/§11 and updates the tally.
L976 (simulator/tools-appliance scope) and L1007 stay open on Daan.

Generated-by: Claude Opus 4.8 (1M context)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants