Skip to content

fix(cloudsec): broken --project flag + wrong help examples - #328

Merged
maximelb merged 1 commit into
masterfrom
fix/cloudsec-cli-help-and-project-flag
Jul 28, 2026
Merged

fix(cloudsec): broken --project flag + wrong help examples#328
maximelb merged 1 commit into
masterfrom
fix/cloudsec-cli-help-and-project-flag

Conversation

@maximelb

Copy link
Copy Markdown
Contributor

Found while auditing the Cloud Security docs against the product (companion to refractionPOINT/documentation#322): the cloudsec CLI group's own --help/--ai-help contradicted the server in four places, and one flag was silently broken.

Fixes

  • --project was silently ignored. The CLI split its value into a list and the SDK sent a JSON array, but the server's project body field is a string that only accepts "graph" — so no value ever had any effect. It is now Choice(["graph"]), passed through verbatim, with help text describing what it actually does (adds the induced subgraph next to the rows). SDK signature updated to project: str | None, docstring corrected.
  • --named public-buckets in help examples — not a real query-pack name; copying the example errors. Now public_data_stores.
  • Natural-language --text examples--text is the Cypher-lite MATCH … RETURN grammar; "public bucket with sensitive data" cannot parse. Replaced with a valid query (the same one the docs use).
  • limacharlie hive list cloudsec_query (positional) — invalid syntax; hive list requires --hive-name. Fixed in all four help texts.
  • Stale --expires-at 1767225600 example — that epoch (2026-01-01) is in the past, so an acceptance created from it is expired on arrival. Now uses "$(date -d '+90 days' +%s)".

Testing

Unit tests updated for the --project semantics and pack name; full unit suite passes (3,676 passed, 6 pre-existing skips).

Note: --project previously accepted arbitrary comma-separated values and did nothing; it now rejects anything but graph. That's a behavior change only for invocations that were already broken.

🤖 Generated with Claude Code

https://claude.ai/code/session_013wAL18rVrkErdz8kBTkkRi

The docs accuracy audit cross-checked the CLI against the server and found
the cloudsec group's own help contradicting reality in four ways, plus one
broken flag:

- --project on 'query run' / 'export query' split its value into a JSON
  array, but the server's 'project' body field is a string that only
  accepts "graph" — so the flag was silently ignored no matter what was
  passed. It is now a Choice(["graph"]) passed through verbatim, and the
  help says what it actually does (adds the induced subgraph next to the
  rows). The SDK signature follows (project: str | None).
- Help examples used '--named public-buckets', which is not a query-pack
  name (the real one is public_data_stores) — anyone copying the example
  got an error.
- Help examples showed natural-language --text queries; --text is the
  Cypher-lite MATCH...RETURN grammar and those examples cannot parse.
  Replaced with a valid query.
- 'limacharlie hive list cloudsec_query' (positional) is invalid syntax;
  hive list requires --hive-name.
- The --expires-at example used epoch 1767225600 (2026-01-01), now in the
  past — an acceptance created from it would be expired on arrival.
  Replaced with a relative form.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013wAL18rVrkErdz8kBTkkRi
@maximelb
maximelb merged commit 4a0289d into master Jul 28, 2026
6 checks passed
@maximelb
maximelb deleted the fix/cloudsec-cli-help-and-project-flag branch July 28, 2026 14:06
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.

2 participants