bravos 0.1.0__py3-none-any.whl

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 (158) hide show
  1. bravos/__init__.py +22 -0
  2. bravos/__main__.py +36 -0
  3. bravos/adapters/__init__.py +4 -0
  4. bravos/adapters/agent.py +1389 -0
  5. bravos/adapters/bravos.py +428 -0
  6. bravos/adapters/cxg.py +1517 -0
  7. bravos/adapters/cxg_bridge.py +237 -0
  8. bravos/adapters/cxg_capabilities.py +275 -0
  9. bravos/adapters/cxg_report.py +265 -0
  10. bravos/adapters/guardlink.py +724 -0
  11. bravos/adapters/guardlink_model.py +527 -0
  12. bravos/adapters/sarif.py +499 -0
  13. bravos/adapters/template_cache.py +163 -0
  14. bravos/budget.py +140 -0
  15. bravos/checkpoint.py +624 -0
  16. bravos/cli.py +2580 -0
  17. bravos/commands/__init__.py +3 -0
  18. bravos/commands/annotate.py +377 -0
  19. bravos/commands/auto.py +774 -0
  20. bravos/commands/ci.py +855 -0
  21. bravos/commands/codegraph.py +116 -0
  22. bravos/commands/config_cmd.py +311 -0
  23. bravos/commands/env_cmd.py +265 -0
  24. bravos/commands/intake_cmd.py +373 -0
  25. bravos/commands/ledger_cmd.py +102 -0
  26. bravos/commands/model.py +341 -0
  27. bravos/commands/plan.py +217 -0
  28. bravos/commands/progress.py +373 -0
  29. bravos/commands/push.py +756 -0
  30. bravos/commands/replay.py +719 -0
  31. bravos/commands/round.py +244 -0
  32. bravos/commands/run.py +874 -0
  33. bravos/commands/sast.py +896 -0
  34. bravos/commands/setup.py +1094 -0
  35. bravos/commands/template.py +783 -0
  36. bravos/commands/web_cmd.py +70 -0
  37. bravos/compat.py +82 -0
  38. bravos/config.py +1063 -0
  39. bravos/convergence.py +317 -0
  40. bravos/correlate.py +638 -0
  41. bravos/env/__init__.py +39 -0
  42. bravos/env/authflow.py +706 -0
  43. bravos/env/canary.py +170 -0
  44. bravos/env/discover_login.py +150 -0
  45. bravos/env/generate.py +161 -0
  46. bravos/env/health.py +137 -0
  47. bravos/env/liveness.py +238 -0
  48. bravos/env/login.py +593 -0
  49. bravos/env/mepath.py +240 -0
  50. bravos/env/provision.py +164 -0
  51. bravos/env/recipe.py +215 -0
  52. bravos/env/recovery.py +385 -0
  53. bravos/errors.py +161 -0
  54. bravos/events.py +64 -0
  55. bravos/exits.py +85 -0
  56. bravos/flows.py +374 -0
  57. bravos/goals.py +994 -0
  58. bravos/inspect.py +265 -0
  59. bravos/intake/__init__.py +25 -0
  60. bravos/intake/derive.py +1536 -0
  61. bravos/intake/discover.py +390 -0
  62. bravos/intake/repo.py +150 -0
  63. bravos/intake/store.py +314 -0
  64. bravos/journal.py +229 -0
  65. bravos/ledger.py +936 -0
  66. bravos/lens.py +427 -0
  67. bravos/lenses/admin.md +29 -0
  68. bravos/lenses/chained.md +41 -0
  69. bravos/lenses/crosstenant.md +28 -0
  70. bravos/lenses/mitigation-audit.md +34 -0
  71. bravos/lenses/stduser.md +30 -0
  72. bravos/lenses/unauth.md +33 -0
  73. bravos/lifecycle.py +234 -0
  74. bravos/mcp/__init__.py +11 -0
  75. bravos/mcp/codegraph.py +355 -0
  76. bravos/mcp/server.py +716 -0
  77. bravos/models/__init__.py +66 -0
  78. bravos/models/claim.py +239 -0
  79. bravos/models/contract.py +366 -0
  80. bravos/models/decision.py +162 -0
  81. bravos/models/env.py +387 -0
  82. bravos/models/exposure.py +308 -0
  83. bravos/models/finding.py +1240 -0
  84. bravos/models/goal.py +384 -0
  85. bravos/models/ledger.py +687 -0
  86. bravos/models/lens.py +240 -0
  87. bravos/models/nonrepro.py +541 -0
  88. bravos/models/plan.py +1287 -0
  89. bravos/models/run.py +731 -0
  90. bravos/models/sast.py +571 -0
  91. bravos/models/triage.py +442 -0
  92. bravos/orchestrator.py +1502 -0
  93. bravos/paths.py +493 -0
  94. bravos/phases/__init__.py +33 -0
  95. bravos/phases/base.py +655 -0
  96. bravos/phases/p00_preflight.py +191 -0
  97. bravos/phases/p10_env.py +66 -0
  98. bravos/phases/p20_auth.py +361 -0
  99. bravos/phases/p30_annotate.py +585 -0
  100. bravos/phases/p40_export.py +492 -0
  101. bravos/phases/p50_synthesize.py +927 -0
  102. bravos/phases/p60_pentest.py +1636 -0
  103. bravos/phases/p70_writeback.py +303 -0
  104. bravos/phases/p75_retract.py +640 -0
  105. bravos/phases/p76_amend.py +280 -0
  106. bravos/phases/p80_report.py +807 -0
  107. bravos/phases/p90_model_report.py +209 -0
  108. bravos/proc.py +316 -0
  109. bravos/prompt.py +177 -0
  110. bravos/prompts/advisory.md +35 -0
  111. bravos/prompts/env-recipe.md +100 -0
  112. bravos/prompts/goal-enrichment.md +31 -0
  113. bravos/prompts/intake-ground.md +62 -0
  114. bravos/prompts/intake-parse.md +96 -0
  115. bravos/prompts/login-derive.md +31 -0
  116. bravos/prompts/me-path.md +22 -0
  117. bravos/prompts/retract.md +41 -0
  118. bravos/prompts/writeback.md +25 -0
  119. bravos/publish.py +389 -0
  120. bravos/remote/__init__.py +19 -0
  121. bravos/remote/client.py +525 -0
  122. bravos/remote/repo_key.py +435 -0
  123. bravos/remote/settings.py +168 -0
  124. bravos/repo_shape.py +62 -0
  125. bravos/report/__init__.py +8 -0
  126. bravos/report/advisory.py +950 -0
  127. bravos/report/advisory_author.py +196 -0
  128. bravos/report/claim.py +554 -0
  129. bravos/report/finding_artifacts.py +225 -0
  130. bravos/report/github.py +321 -0
  131. bravos/report/nonrepro.py +862 -0
  132. bravos/report/probe.py +407 -0
  133. bravos/report/session_store.py +310 -0
  134. bravos/report/summary.py +648 -0
  135. bravos/report/triage.py +2011 -0
  136. bravos/report/verification_memory.py +351 -0
  137. bravos/scheduler.py +110 -0
  138. bravos/store.py +109 -0
  139. bravos/templates/policy.toml +94 -0
  140. bravos/tools.py +311 -0
  141. bravos/web/__init__.py +8 -0
  142. bravos/web/api.py +821 -0
  143. bravos/web/assets/Monoska.otf +0 -0
  144. bravos/web/assets/bugb-icon-black.png +0 -0
  145. bravos/web/assets/embed_assets.py +68 -0
  146. bravos/web/assets/favicon.png +0 -0
  147. bravos/web/embed_render.py +81 -0
  148. bravos/web/findings.py +1248 -0
  149. bravos/web/index.html +3754 -0
  150. bravos/web/jobs.py +305 -0
  151. bravos/web/render.js +1986 -0
  152. bravos/web/sast.py +222 -0
  153. bravos/web/server.py +304 -0
  154. bravos-0.1.0.dist-info/METADATA +539 -0
  155. bravos-0.1.0.dist-info/RECORD +158 -0
  156. bravos-0.1.0.dist-info/WHEEL +4 -0
  157. bravos-0.1.0.dist-info/entry_points.txt +2 -0
  158. bravos-0.1.0.dist-info/licenses/LICENSE +14 -0
bravos/__init__.py ADDED
@@ -0,0 +1,22 @@
1
+ # @comment -- "bravos: deterministic orchestrator that drives guardlink (annotate/SARIF) and
2
+ # cert-x-gen (cxg pentest) in a closed loop until the threat model converges. The package core
3
+ # is a state machine; AI coding-agent CLIs are invoked only at explicit judgment points."
4
+ """bravos — continuous SAST and whitebox pentest orchestrator."""
5
+
6
+ __version__ = "0.1.0"
7
+
8
+ # @comment -- "THE ONE SENTENCE, SO THERE IS ONLY EVER ONE TO CHANGE. The banner tagline, the
9
+ # `--help` description and the bare-`bravos` landing all render from here rather than each
10
+ # carrying its own copy, which is how they drifted apart in the first place — the landing and
11
+ # the tagline had already diverged in capitalisation, and one of the copies was the PyPI
12
+ # summary. The wording is the owner's, verbatim but for two mechanical fixes: SAST is an
13
+ # initialism, and his `Continuous sast, and whitebox pentest orchestrator` read as a list
14
+ # whose first item had no head noun.
15
+ # The docs landing page at docs.bugb.com/bravos/ deliberately keeps a longer benefit
16
+ # sentence instead. A summary and a banner are scanned for keywords, a landing page is read;
17
+ # the two are not required to agree and should not be reconciled.
18
+ # The only copies that cannot import this are `pyproject.toml` — the PyPI summary, read by
19
+ # the build backend before Python runs — and the test that pins the wording."
20
+ DESCRIPTION = "Continuous SAST and whitebox pentest orchestrator"
21
+
22
+ SCHEMA_VERSION = 1
bravos/__main__.py ADDED
@@ -0,0 +1,36 @@
1
+ # @comment -- "Console-script entrypoint; delegates immediately so the CLI stays importable and
2
+ # testable without a subprocess."
3
+ """``python -m bravos`` / ``bravos`` entrypoint."""
4
+
5
+ from __future__ import annotations
6
+
7
+ import sys
8
+
9
+ from .cli import main
10
+
11
+
12
+ # @comment -- "KEPT, NOT SHIPPED, and the distinction is the whole entry. This was the `bugb`
13
+ # console script, and its reason was that `pip install -U` REPLACES a distribution, so an upgrade
14
+ # would take `bugb` off PATH and stop every script, Makefile and CI step a team already wrote.
15
+ # That reason was checked against reality before the first publish and did not survive it: nothing
16
+ # has ever been published, so no machine holds a `bugb` that came from installing this
17
+ # distribution, and the shim protected nobody. What it did do was put a second, unexplained
18
+ # command on a brand-new user's PATH — and a command a customer is told to type is
19
+ # customer-facing, which per the 2026-09-08 decision means it is Bravos.
20
+ # The function stays because deleting it is not free and keeping it is: re-exposing the name is
21
+ # one line in pyproject.toml if real users ever turn out to need it, and until then this is the
22
+ # shape that line would restore. Nothing calls it today.
23
+ # The notice goes to stderr, as every compatibility notice here does — a `--format json` run still
24
+ # has to emit a document a pipeline can parse."
25
+ def main_legacy() -> int:
26
+ """The retired ``bugb`` entry point: says the name moved, then runs ``bravos``.
27
+
28
+ Not declared in ``[project.scripts]``; kept so restoring the name is one line.
29
+ """
30
+ print("note: `bugb` is now `bravos`. This command still works and runs the same engine; "
31
+ "switch to `bravos` when convenient.", file=sys.stderr)
32
+ return main()
33
+
34
+
35
+ if __name__ == "__main__": # pragma: no cover
36
+ sys.exit(main())
@@ -0,0 +1,4 @@
1
+ # @comment -- "Adapters wrap exactly one external surface each and take a ProcRunner by
2
+ # injection, so the fast test suite can assert the precise argv bravos builds without any real
3
+ # binary on PATH."
4
+ """Adapters over external tools."""