narvy-cli 1.2.0__tar.gz → 1.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 (133) hide show
  1. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/CHANGELOG.md +137 -0
  2. narvy_cli-1.3.0/PKG-INFO +617 -0
  3. narvy_cli-1.3.0/README.md +578 -0
  4. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/__init__.py +1 -1
  5. narvy_cli-1.3.0/narvy/cbom.py +430 -0
  6. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/ci_templates/github.yml +20 -0
  7. narvy_cli-1.3.0/narvy/ci_templates/gitlab.yml +48 -0
  8. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/cloud/aws_scan.py +323 -219
  9. narvy_cli-1.3.0/narvy/cloud/gcp_scan.py +470 -0
  10. narvy_cli-1.3.0/narvy/cloud/normalize.py +192 -0
  11. narvy_cli-1.3.0/narvy/cloud/rule_severity.py +533 -0
  12. narvy_cli-1.3.0/narvy/cloud/severity.py +135 -0
  13. narvy_cli-1.3.0/narvy/cloud/upload.py +171 -0
  14. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/decompiler.py +28 -1
  15. narvy_cli-1.3.0/narvy/gitlab_report.py +272 -0
  16. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/main.py +552 -146
  17. narvy_cli-1.3.0/narvy/sbom.py +381 -0
  18. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/sca/ios_deps.py +3 -1
  19. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/sca/osv_client.py +165 -6
  20. narvy_cli-1.3.0/narvy/sca/osv_localdb.py +1056 -0
  21. narvy_cli-1.3.0/narvy/sca/osv_semantic.py +892 -0
  22. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/secret_presentation.py +187 -12
  23. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/store_check/__init__.py +1 -1
  24. narvy_cli-1.3.0/narvy/store_check/android/checks.py +1107 -0
  25. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/store_check/android/xmlmodel.py +2 -0
  26. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/store_check/cli.py +20 -6
  27. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/store_check/data/play.py +89 -0
  28. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/store_check/ios/checks.py +120 -60
  29. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/store_check/model.py +17 -4
  30. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/uploader.py +14 -0
  31. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/web/scanner.py +95 -2
  32. narvy_cli-1.3.0/narvy_cli.egg-info/PKG-INFO +617 -0
  33. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy_cli.egg-info/SOURCES.txt +10 -0
  34. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy_cli.egg-info/requires.txt +4 -0
  35. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/pyproject.toml +7 -2
  36. narvy_cli-1.2.0/PKG-INFO +0 -394
  37. narvy_cli-1.2.0/README.md +0 -361
  38. narvy_cli-1.2.0/narvy/ci_templates/gitlab.yml +0 -19
  39. narvy_cli-1.2.0/narvy/store_check/android/checks.py +0 -668
  40. narvy_cli-1.2.0/narvy_cli.egg-info/PKG-INFO +0 -394
  41. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/LICENSE +0 -0
  42. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/MANIFEST.in +0 -0
  43. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/SECURITY.md +0 -0
  44. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/__main__.py +0 -0
  45. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/android/__init__.py +0 -0
  46. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/android/source_analyzer.py +0 -0
  47. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/android/split_bundle.py +0 -0
  48. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/android_rule_context.py +0 -0
  49. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/apk_memory_preflight.py +0 -0
  50. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/auth.py +0 -0
  51. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/ci_templates/bitbucket.yml +0 -0
  52. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/cloud/__init__.py +0 -0
  53. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/comment_filter.py +0 -0
  54. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/crypto_taint_lite.py +0 -0
  55. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/doctor.py +0 -0
  56. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/host/__init__.py +0 -0
  57. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/host/audit.py +0 -0
  58. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/host/host_knowledge.py +0 -0
  59. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/host/lynis_bootstrap.py +0 -0
  60. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/host/lynis_parser.py +0 -0
  61. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/host/narvy_checks.py +0 -0
  62. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/host/report.py +0 -0
  63. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/host/ssh_exec.py +0 -0
  64. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/ios/__init__.py +0 -0
  65. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/ios/binary_analyzer.py +0 -0
  66. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/ios/plist_checks.py +0 -0
  67. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/ios/source_analyzer.py +0 -0
  68. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/ios/third_party_filter.py +0 -0
  69. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/ios/trust_all_context.py +0 -0
  70. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/native_hardening.py +0 -0
  71. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/own_reports.py +0 -0
  72. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/pathhint.py +0 -0
  73. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/pathnorm.py +0 -0
  74. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/proc.py +0 -0
  75. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/reporter.py +0 -0
  76. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/rule_engine.py +0 -0
  77. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/rules/android/config.yml +0 -0
  78. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/rules/android/crypto.yml +0 -0
  79. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/rules/android/secrets.yml +0 -0
  80. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/rules/android/storage.yml +0 -0
  81. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/rules/android/webview.yml +0 -0
  82. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/rules/android.yml +0 -0
  83. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/rules/ios/objc/crypto.yml +0 -0
  84. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/rules/ios/objc/network.yml +0 -0
  85. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/rules/ios/objc/secrets.yml +0 -0
  86. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/rules/ios/objc/storage.yml +0 -0
  87. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/rules/ios/objc/webview.yml +0 -0
  88. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/rules/ios_swift.yml +0 -0
  89. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/rules/web/go.yml +0 -0
  90. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/rules/web/java.yml +0 -0
  91. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/rules/web/javascript.yml +0 -0
  92. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/rules/web/kotlin.yml +0 -0
  93. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/rules/web/php.yml +0 -0
  94. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/rules/web/python.yml +0 -0
  95. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/rules/web/ruby.yml +0 -0
  96. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/rules/web/rust.yml +0 -0
  97. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/rules/web/secrets.yml +0 -0
  98. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/rules/web/secrets_supplement.yml +0 -0
  99. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/sca/__init__.py +0 -0
  100. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/sca/android_deps.py +0 -0
  101. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/sca/web_deps.py +0 -0
  102. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/scope_config.py +0 -0
  103. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/secret_output.py +0 -0
  104. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/secret_value_grade.py +0 -0
  105. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/semgrep_engine.py +0 -0
  106. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/stack_protector_evidence.py +0 -0
  107. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/store_check/__main__.py +0 -0
  108. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/store_check/analyze.py +0 -0
  109. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/store_check/android/__init__.py +0 -0
  110. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/store_check/android/arsc.py +0 -0
  111. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/store_check/android/axml.py +0 -0
  112. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/store_check/android/elf.py +0 -0
  113. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/store_check/android/loader.py +0 -0
  114. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/store_check/android/protoxml.py +0 -0
  115. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/store_check/archive.py +0 -0
  116. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/store_check/data/__init__.py +0 -0
  117. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/store_check/data/apple.py +0 -0
  118. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/store_check/ios/__init__.py +0 -0
  119. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/store_check/ios/loader.py +0 -0
  120. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/store_check/ios/macho.py +0 -0
  121. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/telemetry.py +0 -0
  122. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/third_party_filter.py +0 -0
  123. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/weak_prng_context.py +0 -0
  124. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/web/__init__.py +0 -0
  125. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/web/nuclei_binary.py +0 -0
  126. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/web/scan_blocklist.py +0 -0
  127. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/web/source_analyzer.py +0 -0
  128. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy/web/ssrf_guard.py +0 -0
  129. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy_cli.egg-info/dependency_links.txt +0 -0
  130. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy_cli.egg-info/entry_points.txt +0 -0
  131. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/narvy_cli.egg-info/top_level.txt +0 -0
  132. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/setup.cfg +0 -0
  133. {narvy_cli-1.2.0 → narvy_cli-1.3.0}/setup.py +0 -0
@@ -5,6 +5,143 @@ All notable changes to this project are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.3.0]
9
+
10
+ 1.2.2 was not published on its own; its changes ship in 1.3.0.
11
+
12
+ ### Added
13
+
14
+ - `cloud-scan --upload`: sends the findings and the scan metadata (provider,
15
+ account or project id, coverage status and count) to your Narvy dashboard.
16
+ Never a credential: the body is built from an allow-list of finding
17
+ fields, and an upload is refused when any of its text carries a secret of
18
+ the credentials the scan used (AWS key id, secret and session token from
19
+ the boto3 chain, profile and SSO included; Google access and refresh
20
+ token), a credential environment variable value, or a credential shape
21
+ (AWS key id, private key, `ya29.`, `GOCSPX-`, `1//`).
22
+ - `cloud-scan --provider gcp`: GCP project posture checks with Application
23
+ Default Credentials (`--project`, else the gcloud project). A check whose
24
+ API answers permission denied, 429, 5xx or nothing is reported as PARTIAL
25
+ coverage, never as clean; a 404 (service not enabled or not in use) is not
26
+ a gap.
27
+ - `cloud-scan --profile`: AWS named profile (SSO and assume-role profiles).
28
+ - `scans --status cancelled`: lists scans their user cancelled on the
29
+ platform; shown dimmed in the table.
30
+
31
+ ### Changed
32
+
33
+ - `cloud-scan` runs the same AWS checks and severities as the Narvy
34
+ platform (one fixed severity per check, with its reference); the JSON
35
+ output adds `provider`, `account_id` and `findings`.
36
+
37
+ - Dependency check (SCA): dependencies are matched locally against the
38
+ public OSV database. No package name or version is sent. For each
39
+ ecosystem a scan needs, the CLI downloads
40
+ `https://osv-vulnerabilities.storage.googleapis.com/<ecosystem>/all.zip`
41
+ (the request names the ecosystem only), checks it (size, md5, zip
42
+ integrity), stores it as SQLite in `~/.cache/narvy/osv/` with a sha256
43
+ checked on each use, and downloads it again when older than 24 hours.
44
+ A failed refresh keeps the previous copy and the scan reports its age; a
45
+ copy older than 7 days is not used and the check is reported INCOMPLETE
46
+ (exit 2 with `--fail-on`). A damaged file is moved aside as
47
+ `<ecosystem>.db.corrupt` and downloaded again. npm is about 220 MB to
48
+ download and 301 MB on disk; a refresh needs about 820 MB free while it
49
+ runs.
50
+ - NuGet and crates.io package names match case-insensitively, as on
51
+ api.osv.dev.
52
+ - An error inside the dependency check reports it INCOMPLETE (exit 2 with
53
+ `--fail-on`) instead of skipping it.
54
+ - The network lookup of earlier releases (Narvy's EU mirror, or
55
+ `OSV_API_URL`) is available with `narvy scan --osv-api`, off by default.
56
+ It prints a warning that dependency names and versions are sent.
57
+ - `init-ci --github` caches `~/.cache/narvy/osv` (one key per UTC day);
58
+ `init-ci --gitlab` caches it in `.narvy-osv/`.
59
+ - `narvy store-check`: the summary line uses real plurals in English and
60
+ French ("1 blocker, 2 warnings", "0 bloquant, 2 avertissements") instead
61
+ of "blocker(s)".
62
+ - The store-check report's `tool_version` is `0.3.0`. Results of the checks
63
+ present in 1.2.1 are unchanged, except `PLAY-PERMISSION-DECLARATION` on
64
+ apps that declare a VpnService.
65
+ - README rewritten (install, quick start with real output, what each
66
+ command sends), store-check demo, PyPI summary and project URLs.
67
+
68
+ ### Added
69
+
70
+ - `narvy scan --offline`: nothing leaves the machine (no database or tool
71
+ download, no usage event, no GitHub advisory lookup; `--upload` is
72
+ refused). An ecosystem with no usable cached copy is reported not checked
73
+ (SCA INCOMPLETE). An APK scan without jadx or Java installed skips the
74
+ code analysis, reported not run (exit 2 with `--fail-on`); `narvy doctor`
75
+ installs them while online.
76
+ - `narvy db update [--ecosystem ...] [--all]` and `narvy db status`.
77
+ - `narvy sbom`: CycloneDX 1.6 SBOM of a source directory, APK/AAB or IPA,
78
+ built offline from the dependencies the dependency check reads. Licenses
79
+ only where recorded locally (package-lock.json, node_modules,
80
+ composer.lock). `--sign-key` signs it with Ed25519 (JSF); unsigned
81
+ otherwise, and said so. Signing needs `pip install 'narvy-cli[sign]'`.
82
+ - `narvy verify-sbom`: checks the signature; `--public-key` also checks the
83
+ signer. Exit 1 when unsigned, modified or signed by another key.
84
+ - `narvy cbom`: CycloneDX 1.6 CBOM, a basic open crypto inventory (source
85
+ call sites, dex string constants, iOS crypto symbols) with a post-quantum
86
+ readiness score per algorithm family. No score when no asymmetric
87
+ algorithm is found. Post-quantum names shipped by a bundled Bouncy Castle
88
+ are listed, not scored.
89
+ - `narvy scan --sbom FILE [--sign-key KEY] --cbom FILE` writes both after
90
+ the scan.
91
+
92
+ - `narvy scan --output gitlab`: GitLab SAST report (`gl-sast-report.json`,
93
+ security report schema 15.2.1) for `artifacts:reports:sast`, read by the
94
+ merge request security widget and the pipeline Security tab. The
95
+ `init-ci --gitlab` template uses it; GitLab ingests a report only from a
96
+ job that succeeds, so the `--fail-on` exit code now fails a second
97
+ `narvy_gate` job.
98
+ - `narvy store-check`: four Google Play policy changes that take effect on
99
+ 2027-01-27, each citing the Play Console Help article it comes from:
100
+ - `PLAY-CONTACTS-PERMISSION`: an app that targets API 37+ and requests
101
+ `READ_CONTACTS` needs a Play Console declaration explaining why the
102
+ Android Contact Picker is not enough.
103
+ - `PLAY-PRECISE-LOCATION`: `ACCESS_FINE_LOCATION` without the
104
+ `onlyForLocationButton` flag needs the precise location declaration;
105
+ from target API 37, one-time precise location must go through the
106
+ location button. The flag passes the check.
107
+ - `PLAY-FGS-GEOFENCING`: geofencing is no longer an approved foreground
108
+ service use. A service of type `location` is reported as not
109
+ determined, since its use is not in the binary.
110
+ - `PLAY-CALL-LOG-VERIFICATION`: `READ_CALL_LOG` is no longer accepted for
111
+ account verification by phone call. Reported as not determined when
112
+ the permission is requested.
113
+ Before 2027-01-27 (or the `--as-of` date) their titles start with
114
+ "Required from 2027-01-27". None of them is ever a blocker: what Google
115
+ requires (an approved declaration, or a use it no longer allows) cannot
116
+ be read from a binary.
117
+ - `PLAY-PERMISSION-DECLARATION` now detects a `VpnService` (a service
118
+ protected by `BIND_VPN_SERVICE` or with an `android.net.VpnService`
119
+ intent filter): Google Play requires the VpnService declaration for it.
120
+
121
+ ## [1.2.1]
122
+
123
+ ### Fixed
124
+
125
+ - `narvy store-check`: a failed check was titled with the wording of the
126
+ rule it failed, so the terminal printed contradictions such as
127
+ `[BLOCKER] PLAY-TARGET-SDK: Target API level meets Google Play's current
128
+ requirement`. Every check now has a title per status, in English and
129
+ French, citing the value read when it helps: `Target API 33 is below
130
+ Google Play's requirement (API 36)` on a failure, `Target API 36 meets
131
+ Google Play's requirement (API 36)` on a pass, `Target API level not
132
+ determined (targetSdkVersion unresolved)` when the binary does not settle
133
+ it. Check ids, statuses, severities, messages and exit codes are
134
+ unchanged.
135
+
136
+ ### Changed
137
+
138
+ - `narvy store-check --json`: `title` keeps its shape (`{"en", "fr"}`) and
139
+ now describes the result for its status. The rule text that `title`
140
+ carried in 1.2.0 moves to a new `requirement` field (`{"en", "fr"}`), the
141
+ same for every status. `tool_version` of the store-check report is
142
+ `0.2.0`. A consumer that used `title` as a fixed label per check id
143
+ should read `requirement` instead.
144
+
8
145
  ## [1.2.0]
9
146
 
10
147
  ### Added