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.
- bravos/__init__.py +22 -0
- bravos/__main__.py +36 -0
- bravos/adapters/__init__.py +4 -0
- bravos/adapters/agent.py +1389 -0
- bravos/adapters/bravos.py +428 -0
- bravos/adapters/cxg.py +1517 -0
- bravos/adapters/cxg_bridge.py +237 -0
- bravos/adapters/cxg_capabilities.py +275 -0
- bravos/adapters/cxg_report.py +265 -0
- bravos/adapters/guardlink.py +724 -0
- bravos/adapters/guardlink_model.py +527 -0
- bravos/adapters/sarif.py +499 -0
- bravos/adapters/template_cache.py +163 -0
- bravos/budget.py +140 -0
- bravos/checkpoint.py +624 -0
- bravos/cli.py +2580 -0
- bravos/commands/__init__.py +3 -0
- bravos/commands/annotate.py +377 -0
- bravos/commands/auto.py +774 -0
- bravos/commands/ci.py +855 -0
- bravos/commands/codegraph.py +116 -0
- bravos/commands/config_cmd.py +311 -0
- bravos/commands/env_cmd.py +265 -0
- bravos/commands/intake_cmd.py +373 -0
- bravos/commands/ledger_cmd.py +102 -0
- bravos/commands/model.py +341 -0
- bravos/commands/plan.py +217 -0
- bravos/commands/progress.py +373 -0
- bravos/commands/push.py +756 -0
- bravos/commands/replay.py +719 -0
- bravos/commands/round.py +244 -0
- bravos/commands/run.py +874 -0
- bravos/commands/sast.py +896 -0
- bravos/commands/setup.py +1094 -0
- bravos/commands/template.py +783 -0
- bravos/commands/web_cmd.py +70 -0
- bravos/compat.py +82 -0
- bravos/config.py +1063 -0
- bravos/convergence.py +317 -0
- bravos/correlate.py +638 -0
- bravos/env/__init__.py +39 -0
- bravos/env/authflow.py +706 -0
- bravos/env/canary.py +170 -0
- bravos/env/discover_login.py +150 -0
- bravos/env/generate.py +161 -0
- bravos/env/health.py +137 -0
- bravos/env/liveness.py +238 -0
- bravos/env/login.py +593 -0
- bravos/env/mepath.py +240 -0
- bravos/env/provision.py +164 -0
- bravos/env/recipe.py +215 -0
- bravos/env/recovery.py +385 -0
- bravos/errors.py +161 -0
- bravos/events.py +64 -0
- bravos/exits.py +85 -0
- bravos/flows.py +374 -0
- bravos/goals.py +994 -0
- bravos/inspect.py +265 -0
- bravos/intake/__init__.py +25 -0
- bravos/intake/derive.py +1536 -0
- bravos/intake/discover.py +390 -0
- bravos/intake/repo.py +150 -0
- bravos/intake/store.py +314 -0
- bravos/journal.py +229 -0
- bravos/ledger.py +936 -0
- bravos/lens.py +427 -0
- bravos/lenses/admin.md +29 -0
- bravos/lenses/chained.md +41 -0
- bravos/lenses/crosstenant.md +28 -0
- bravos/lenses/mitigation-audit.md +34 -0
- bravos/lenses/stduser.md +30 -0
- bravos/lenses/unauth.md +33 -0
- bravos/lifecycle.py +234 -0
- bravos/mcp/__init__.py +11 -0
- bravos/mcp/codegraph.py +355 -0
- bravos/mcp/server.py +716 -0
- bravos/models/__init__.py +66 -0
- bravos/models/claim.py +239 -0
- bravos/models/contract.py +366 -0
- bravos/models/decision.py +162 -0
- bravos/models/env.py +387 -0
- bravos/models/exposure.py +308 -0
- bravos/models/finding.py +1240 -0
- bravos/models/goal.py +384 -0
- bravos/models/ledger.py +687 -0
- bravos/models/lens.py +240 -0
- bravos/models/nonrepro.py +541 -0
- bravos/models/plan.py +1287 -0
- bravos/models/run.py +731 -0
- bravos/models/sast.py +571 -0
- bravos/models/triage.py +442 -0
- bravos/orchestrator.py +1502 -0
- bravos/paths.py +493 -0
- bravos/phases/__init__.py +33 -0
- bravos/phases/base.py +655 -0
- bravos/phases/p00_preflight.py +191 -0
- bravos/phases/p10_env.py +66 -0
- bravos/phases/p20_auth.py +361 -0
- bravos/phases/p30_annotate.py +585 -0
- bravos/phases/p40_export.py +492 -0
- bravos/phases/p50_synthesize.py +927 -0
- bravos/phases/p60_pentest.py +1636 -0
- bravos/phases/p70_writeback.py +303 -0
- bravos/phases/p75_retract.py +640 -0
- bravos/phases/p76_amend.py +280 -0
- bravos/phases/p80_report.py +807 -0
- bravos/phases/p90_model_report.py +209 -0
- bravos/proc.py +316 -0
- bravos/prompt.py +177 -0
- bravos/prompts/advisory.md +35 -0
- bravos/prompts/env-recipe.md +100 -0
- bravos/prompts/goal-enrichment.md +31 -0
- bravos/prompts/intake-ground.md +62 -0
- bravos/prompts/intake-parse.md +96 -0
- bravos/prompts/login-derive.md +31 -0
- bravos/prompts/me-path.md +22 -0
- bravos/prompts/retract.md +41 -0
- bravos/prompts/writeback.md +25 -0
- bravos/publish.py +389 -0
- bravos/remote/__init__.py +19 -0
- bravos/remote/client.py +525 -0
- bravos/remote/repo_key.py +435 -0
- bravos/remote/settings.py +168 -0
- bravos/repo_shape.py +62 -0
- bravos/report/__init__.py +8 -0
- bravos/report/advisory.py +950 -0
- bravos/report/advisory_author.py +196 -0
- bravos/report/claim.py +554 -0
- bravos/report/finding_artifacts.py +225 -0
- bravos/report/github.py +321 -0
- bravos/report/nonrepro.py +862 -0
- bravos/report/probe.py +407 -0
- bravos/report/session_store.py +310 -0
- bravos/report/summary.py +648 -0
- bravos/report/triage.py +2011 -0
- bravos/report/verification_memory.py +351 -0
- bravos/scheduler.py +110 -0
- bravos/store.py +109 -0
- bravos/templates/policy.toml +94 -0
- bravos/tools.py +311 -0
- bravos/web/__init__.py +8 -0
- bravos/web/api.py +821 -0
- bravos/web/assets/Monoska.otf +0 -0
- bravos/web/assets/bugb-icon-black.png +0 -0
- bravos/web/assets/embed_assets.py +68 -0
- bravos/web/assets/favicon.png +0 -0
- bravos/web/embed_render.py +81 -0
- bravos/web/findings.py +1248 -0
- bravos/web/index.html +3754 -0
- bravos/web/jobs.py +305 -0
- bravos/web/render.js +1986 -0
- bravos/web/sast.py +222 -0
- bravos/web/server.py +304 -0
- bravos-0.1.0.dist-info/METADATA +539 -0
- bravos-0.1.0.dist-info/RECORD +158 -0
- bravos-0.1.0.dist-info/WHEEL +4 -0
- bravos-0.1.0.dist-info/entry_points.txt +2 -0
- 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())
|