qualys-cli 0.1.9__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/.gitignore +4 -0
  2. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/CHANGELOG.md +123 -0
  3. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/PKG-INFO +1 -1
  4. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/pyproject.toml +1 -1
  5. qualys_cli-0.3.0/src/qualys_cli/__init__.py +1 -0
  6. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/_docs/usage.html +21 -21
  7. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/cli.py +3 -1
  8. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/client.py +35 -2
  9. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/commands/asset.py +67 -0
  10. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/commands/ca.py +74 -0
  11. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/commands/cs.py +384 -1
  12. qualys_cli-0.3.0/src/qualys_cli/commands/edr.py +34 -0
  13. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/commands/etm.py +115 -0
  14. qualys_cli-0.3.0/src/qualys_cli/commands/fim.py +47 -0
  15. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/commands/pc.py +100 -0
  16. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/commands/pm.py +109 -3
  17. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/commands/tc.py +97 -0
  18. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/commands/vm.py +455 -1
  19. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/commands/was.py +66 -0
  20. qualys_cli-0.3.0/src/qualys_cli/detection_stats.py +225 -0
  21. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/conftest.py +11 -0
  22. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_all_commands_smoke.py +11 -0
  23. qualys_cli-0.3.0/tests/test_asset_tags.py +68 -0
  24. qualys_cli-0.3.0/tests/test_detection_stats.py +178 -0
  25. qualys_cli-0.3.0/tests/test_detection_stats_cmd.py +337 -0
  26. qualys_cli-0.3.0/tests/test_fim_edr.py +72 -0
  27. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_help.py +3 -1
  28. qualys_cli-0.3.0/tests/test_kcs_mitigation.py +91 -0
  29. qualys_cli-0.3.0/tests/test_kev.py +120 -0
  30. qualys_cli-0.3.0/tests/test_mcp_live.py +640 -0
  31. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_pc.py +59 -0
  32. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_tc.py +74 -0
  33. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_vm.py +233 -0
  34. qualys_cli-0.1.9/src/qualys_cli/__init__.py +0 -1
  35. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/LICENSE +0 -0
  36. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/README.md +0 -0
  37. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/__main__.py +0 -0
  38. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/audit.py +0 -0
  39. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/auth.py +0 -0
  40. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/cache.py +0 -0
  41. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/commands/__init__.py +0 -0
  42. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/commands/csam.py +0 -0
  43. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/commands/scanauth.py +0 -0
  44. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/commands/sub.py +0 -0
  45. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/commands/user.py +0 -0
  46. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/config.py +0 -0
  47. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/extras.py +0 -0
  48. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/flair.py +0 -0
  49. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/formatters.py +0 -0
  50. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/history.py +0 -0
  51. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/http_server.py +0 -0
  52. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/mcp_server.py +0 -0
  53. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/metrics.py +0 -0
  54. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/platforms.py +0 -0
  55. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/src/qualys_cli/queries.py +0 -0
  56. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/__init__.py +0 -0
  57. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_agent_mode.py +0 -0
  58. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_asset.py +0 -0
  59. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_audit.py +0 -0
  60. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_ca.py +0 -0
  61. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_client.py +0 -0
  62. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_csam.py +0 -0
  63. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_error_handling.py +0 -0
  64. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_etm.py +0 -0
  65. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_features.py +0 -0
  66. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_flair.py +0 -0
  67. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_formatters.py +0 -0
  68. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_global_flags.py +0 -0
  69. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_high_fixes.py +0 -0
  70. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_isolation.py +0 -0
  71. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_main.py +0 -0
  72. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_med_fixes.py +0 -0
  73. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_pm.py +0 -0
  74. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_resiliency.py +0 -0
  75. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_review_fixes.py +0 -0
  76. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_scanauth.py +0 -0
  77. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_security_fixes.py +0 -0
  78. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_sub.py +0 -0
  79. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_user.py +0 -0
  80. {qualys_cli-0.1.9 → qualys_cli-0.3.0}/tests/test_was.py +0 -0
@@ -1,4 +1,5 @@
1
1
  .venv/
2
+ .anthropic_key
2
3
  .install-check/
3
4
  __pycache__/
4
5
  *.pyc
@@ -38,3 +39,6 @@ user-prefs-export.xml
38
39
  api-model.json
39
40
  docs/design.md
40
41
  packaging/
42
+
43
+ # Editor workspace files
44
+ *.code-workspace
@@ -6,6 +6,129 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.3.0] — 2026-11-03
10
+
11
+ ### Added
12
+ - `etm finding list/get/count` and `etm asset list/count` — ETM findings
13
+ and assets inventory resources (QQL `query`/`havingQuery`; findings
14
+ paginate by `page`, assets by `pageNumber`).
15
+ - `cs k8s-resource namespace-list/namespace-get/pod-list/pod-get` —
16
+ Kubernetes namespace/pod inventory.
17
+ - `cs secret-detector list/create/bulk-update` — secret detection rules.
18
+ - `cs qid-list list/get/vulns` — QID lists used by CS policies.
19
+ - `cs tag create/update/delete/assign/remove/exist` — CS tag management.
20
+ - `ca isolation isolate/unisolate` — asset isolation by asset or tag ID.
21
+ - `pm blocking-rule list/create/delete` — patch blocking rules.
22
+ - `was catalog get/update` and `was option-profile update`.
23
+
24
+ ### Fixed
25
+ - `__version__` reported `0.1.9` (User-Agent / version banner).
26
+ - WAS `catalog update` values are CDATA-wrapped to prevent XML injection.
27
+
28
+ ### Changed
29
+ - Doc ingestion: VM/PC sitemaps moved to
30
+ `en/vm/qweb-all-api/mergedProjects/qapi-*`; added WAS/TC/CA/CS/CSAM
31
+ sources. `api-model.json` refreshed (744 endpoints).
32
+ - `scripts/diff_endpoints.py` — normalized old/new model endpoint delta.
33
+
34
+ ## [0.2.0] — 2026-09-21
35
+
36
+ ### Added
37
+ - `cs k8s-cluster list/get` — Kubernetes cluster security (KCS). Path per
38
+ the gateway's own swagger: /csapi/v1.3/k8sClusters.
39
+ - `cs policy list` — centralized image-assurance / CI-CD gate policies.
40
+ - `pm mitigation plan` — available FIX-type mitigation scripts per QID
41
+ (POST /mtg/v1/vulnerabilities/mitigations; empty = patch-only QIDs).
42
+ - `fim events` — File Integrity Monitoring event search (who changed what,
43
+ when). Note: pagination rides in the request body; the query param is
44
+ silently ignored by the API (verified live).
45
+ - `edr events` — EDR endpoint telemetry search. The EDR API is served
46
+ under its platform module name, `/ioc/`.
47
+ - `tc evaluation resources` — resources evaluated against one control
48
+ ("which S3 buckets fail X"), failing-only by default with per-resource
49
+ failure evidence. Filter field verified live: `resource.result:FAIL`
50
+ (bare `result:FAIL` is accepted but silently matches nothing).
51
+ - `tc resource list` / `tc resource get` — cloud resource inventory with
52
+ failed-control counts. Note: this path family requires the UPPERCASE
53
+ provider segment (lowercase 404s misleadingly).
54
+ - `pc exception list` — compliance exceptions/waivers with status,
55
+ expiration, policy/control filters.
56
+ - `pc control list` — compliance controls; `--frameworks` adds SOC2/ISO/
57
+ NIST/CIS framework section mappings (details=All).
58
+ - `asset tag list` — enumerate configured asset tags (id/name/parent),
59
+ the scoping unit for business-unit and team rollups.
60
+ - `vm host detection` / `detection-stats`: `--include-ignored` surfaces
61
+ detections in the ignored/exception workflow.
62
+ - `vm kb qvs` enumeration mode: search the CVE universe by QVS range and
63
+ NVD publish window (`--qvs-min/--qvs-max/--published-after/
64
+ --published-before/--modified-after`) with client-side
65
+ `--exploit-maturity/--threat-actor/--cisa-only` filters. Routes to the
66
+ v3 endpoint (v2 hard-requires a CVE list). Closes the largest coverage
67
+ gap found auditing the 923-question CRA bank.
68
+ - `vm appliance list --full` — output_mode=full detail: last-connected
69
+ time, signature versions, interface config.
70
+ - `pm patch list --platform` documents MacOS (value already passed
71
+ through; help text implied Windows|Linux only).
72
+ - `vm host detection-stats`: `--qds` / `--qds-min` (Qualys Detection Score
73
+ aggregation: mean/max/critical count overall and per QID, server-side
74
+ QDS range filtering), `--sla-days N` (within/beyond share for arbitrary
75
+ SLA thresholds), `--fixed-since` (unambiguous "fixed in window" spelling),
76
+ `--top N` (configurable QID concentration list).
77
+ - `vm kb qvs` — Qualys Vulnerability Score per CVE with contributing
78
+ factors (CVSS, EPSS, exploit maturity, threat actors, malware, CISA KEV
79
+ status + due date). JSON endpoint, ETag-cached.
80
+ - `vm kb list --lean` — compact records (qid/title/severity/cves/patchable/
81
+ kev) instead of ~76KB-per-QID full entries; sized for LLM context windows.
82
+ - `vm host list`: `--show-trurisk`, `--trurisk-min/--trurisk-max` — TruRisk
83
+ score, asset criticality, and factors per host (documented Host List API
84
+ params).
85
+ - `vm scan list --ref <scan_ref>` — single-scan drill-down with STATUS /
86
+ SUB_STATE and option-profile detail for diagnosing errored scans.
87
+ - `vm host exists` — disambiguates "host has no matching detections" from
88
+ "host is not in the subscription", with per-host last-scan freshness.
89
+ - `QUALYS_FO_API_VERSION=3|4` — opt-in migration off the End-of-Service
90
+ /api/2.0/fo/ paths for the versioned endpoints (host list, detection,
91
+ knowledge base, QVS). v3/v4 authenticate with JWT bearer (exchanged and
92
+ cached automatically) instead of Basic auth. Default remains v2 until
93
+ the EOL date approaches.
94
+ - `vm host detection-stats` — population-level aggregates (MTTR / backlog age)
95
+ in one command: paginates the full matching detection population internally
96
+ with lean server-side params and returns count, mean/median/p25/p75/min/max
97
+ days, an age histogram, per-severity and top-QID breakdowns, plus a
98
+ `definition` field stating exactly what the metric measures. Built for
99
+ MCP/agent callers so "what's our MTTR" is one tool call, not dozens.
100
+ - `vm host detection-stats --kev` — restrict any stats query to CISA KEV
101
+ vulnerabilities. Resolves the KEV QID set internally and filters
102
+ client-side (no Qualys API version supports server-side threat-intel
103
+ filtering — verified against v2 and v4).
104
+ - `vm kb kev-qids` — enumerate the full QID set covering the CISA KEV
105
+ catalog (public CISA feed → chunked, parallel, ETag-cached KB mapping;
106
+ ~4 min cold, sub-second warm).
107
+ - `vm host detection`: new server-side cost-cutting options `--status`,
108
+ `--detection-updated-since`, `--show-results/--no-show-results`,
109
+ `--show-igs/--no-show-igs`.
110
+ - `client.cached_get_xml()` — ETag/soft-TTL cached XML GET, mirroring
111
+ `cached_get_json`; `vm kb list` now uses it (repeat catalog queries
112
+ revalidate instead of re-downloading multi-MB responses).
113
+
114
+ ### Fixed
115
+ - `vm host list` / `vm host detection`: `--limit` is now sent server-side as
116
+ `truncation_limit`. Previously it was applied client-side after the API
117
+ had evaluated and serialized the full result set (observed: an 88 MB /
118
+ 497 s response trimmed locally to 3 rows).
119
+ - `vm scan list --limit` now bounds JSON output (the scan list API has no
120
+ truncation param and the limit was only applied to table renders —
121
+ `--limit 8` returned the full 554-scan history).
122
+ - For windowed MTTR queries, detections whose fix predates the
123
+ `--detection-updated-since` window are excluded and counted in
124
+ `dropped_fixed_before_window` (the server filters on record-update time,
125
+ not fix time).
126
+ - Percentiles use inclusive interpolation (`statistics.quantiles`); the
127
+ previous nearest-rank-via-`round()` biased small-sample medians low.
128
+ - Test suite no longer reads or writes the developer's real
129
+ `~/.config/qualys-cli/` (config, cache, install-id are isolated per-test;
130
+ a canary test guards the invariant).
131
+
9
132
  ## [0.1.9] — 2026-08-12
10
133
 
11
134
  ### Changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: qualys-cli
3
- Version: 0.1.9
3
+ Version: 0.3.0
4
4
  Summary: Unified command-line interface for the Qualys Cloud Platform REST APIs (VM, PC, PM, ETM, WAS, TotalCloud, Cloud Agent, Container Security, CSAM, Subscription, Asset, and User management).
5
5
  Project-URL: Homepage, https://www.qualys.com
6
6
  Author-email: Qualys <support@qualys.com>
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "qualys-cli"
7
- version = "0.1.9"
7
+ version = "0.3.0"
8
8
  description = "Unified command-line interface for the Qualys Cloud Platform REST APIs (VM, PC, PM, ETM, WAS, TotalCloud, Cloud Agent, Container Security, CSAM, Subscription, Asset, and User management)."
9
9
  readme = { file = "README.md", content-type = "text/markdown" }
10
10
  license = { file = "LICENSE" }
@@ -0,0 +1 @@
1
+ __version__ = "0.3.0"