probity 0.1.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 (119) hide show
  1. probity-0.1.0/.github/workflows/ci.yml +30 -0
  2. probity-0.1.0/.gitignore +25 -0
  3. probity-0.1.0/CHANGELOG.md +30 -0
  4. probity-0.1.0/CONTRIBUTING.md +25 -0
  5. probity-0.1.0/LICENSE +661 -0
  6. probity-0.1.0/PKG-INFO +121 -0
  7. probity-0.1.0/README.md +99 -0
  8. probity-0.1.0/docs/ARCHITECTURE.md +85 -0
  9. probity-0.1.0/docs/CONTROLS.md +140 -0
  10. probity-0.1.0/docs/ROADMAP.md +46 -0
  11. probity-0.1.0/docs/TIERING.md +126 -0
  12. probity-0.1.0/pyproject.toml +50 -0
  13. probity-0.1.0/src/probity/__init__.py +6 -0
  14. probity-0.1.0/src/probity/__main__.py +7 -0
  15. probity-0.1.0/src/probity/cli.py +251 -0
  16. probity-0.1.0/src/probity/commands/__init__.py +11 -0
  17. probity-0.1.0/src/probity/commands/registry.py +36 -0
  18. probity-0.1.0/src/probity/connectors/__init__.py +3 -0
  19. probity-0.1.0/src/probity/connectors/base.py +21 -0
  20. probity-0.1.0/src/probity/connectors/cyclonedx_connector.py +59 -0
  21. probity-0.1.0/src/probity/connectors/mock_assets.py +66 -0
  22. probity-0.1.0/src/probity/connectors/mock_backup.py +45 -0
  23. probity-0.1.0/src/probity/connectors/mock_cloud.py +45 -0
  24. probity-0.1.0/src/probity/connectors/mock_governance.py +58 -0
  25. probity-0.1.0/src/probity/connectors/mock_idp.py +45 -0
  26. probity-0.1.0/src/probity/connectors/mock_pipeline.py +48 -0
  27. probity-0.1.0/src/probity/connectors/mock_sbom.py +52 -0
  28. probity-0.1.0/src/probity/connectors/mock_sca.py +53 -0
  29. probity-0.1.0/src/probity/connectors/mock_siem.py +55 -0
  30. probity-0.1.0/src/probity/connectors/mock_tls.py +45 -0
  31. probity-0.1.0/src/probity/connectors/mock_training.py +49 -0
  32. probity-0.1.0/src/probity/connectors/osv_connector.py +95 -0
  33. probity-0.1.0/src/probity/connectors/registry.py +36 -0
  34. probity-0.1.0/src/probity/connectors/restic_connector.py +75 -0
  35. probity-0.1.0/src/probity/connectors/sslyze_connector.py +122 -0
  36. probity-0.1.0/src/probity/connectors/testssl_connector.py +110 -0
  37. probity-0.1.0/src/probity/connectors/trivy_connector.py +84 -0
  38. probity-0.1.0/src/probity/connectors/veeam_connector.py +67 -0
  39. probity-0.1.0/src/probity/controls/__init__.py +61 -0
  40. probity-0.1.0/src/probity/controls/base.py +27 -0
  41. probity-0.1.0/src/probity/controls/c01_security_policy.py +18 -0
  42. probity-0.1.0/src/probity/controls/c02_asset_inventory.py +94 -0
  43. probity-0.1.0/src/probity/controls/c03_logging.py +93 -0
  44. probity-0.1.0/src/probity/controls/c04_detection.py +102 -0
  45. probity-0.1.0/src/probity/controls/c05_incident_procedure.py +18 -0
  46. probity-0.1.0/src/probity/controls/c06_backups.py +104 -0
  47. probity-0.1.0/src/probity/controls/c07_restore.py +110 -0
  48. probity-0.1.0/src/probity/controls/c08_immutable.py +90 -0
  49. probity-0.1.0/src/probity/controls/c09_sbom.py +109 -0
  50. probity-0.1.0/src/probity/controls/c10_cves.py +95 -0
  51. probity-0.1.0/src/probity/controls/c11_supplier_risk.py +87 -0
  52. probity-0.1.0/src/probity/controls/c12_vuln_scanning.py +85 -0
  53. probity-0.1.0/src/probity/controls/c13_cicd_security.py +80 -0
  54. probity-0.1.0/src/probity/controls/c14_patch_management.py +95 -0
  55. probity-0.1.0/src/probity/controls/c15_disclosure.py +18 -0
  56. probity-0.1.0/src/probity/controls/c16_training.py +85 -0
  57. probity-0.1.0/src/probity/controls/c17_encryption.py +72 -0
  58. probity-0.1.0/src/probity/controls/c18_tls.py +88 -0
  59. probity-0.1.0/src/probity/controls/c19_access.py +73 -0
  60. probity-0.1.0/src/probity/controls/c20_mfa.py +76 -0
  61. probity-0.1.0/src/probity/controls/freshness.py +41 -0
  62. probity-0.1.0/src/probity/controls/soft.py +126 -0
  63. probity-0.1.0/src/probity/engine/__init__.py +6 -0
  64. probity-0.1.0/src/probity/engine/runner.py +45 -0
  65. probity-0.1.0/src/probity/model/__init__.py +16 -0
  66. probity-0.1.0/src/probity/model/enums.py +21 -0
  67. probity-0.1.0/src/probity/model/fact.py +39 -0
  68. probity-0.1.0/src/probity/model/finding.py +80 -0
  69. probity-0.1.0/src/probity/plugins.py +22 -0
  70. probity-0.1.0/src/probity/py.typed +0 -0
  71. probity-0.1.0/src/probity/report/__init__.py +6 -0
  72. probity-0.1.0/src/probity/report/history.py +101 -0
  73. probity-0.1.0/src/probity/report/html_report.py +140 -0
  74. probity-0.1.0/src/probity/report/json_report.py +12 -0
  75. probity-0.1.0/src/probity/report/registry.py +49 -0
  76. probity-0.1.0/src/probity/report/text_report.py +20 -0
  77. probity-0.1.0/src/probity/scan_addons/__init__.py +12 -0
  78. probity-0.1.0/src/probity/scan_addons/registry.py +34 -0
  79. probity-0.1.0/tests/fixtures/cloud_sample.json +8 -0
  80. probity-0.1.0/tests/fixtures/governance_sample.json +39 -0
  81. probity-0.1.0/tests/fixtures/hard_sample.json +26 -0
  82. probity-0.1.0/tests/fixtures/idp_sample.json +9 -0
  83. probity-0.1.0/tests/fixtures/tls_sample.json +8 -0
  84. probity-0.1.0/tests/test_c06_backups.py +79 -0
  85. probity-0.1.0/tests/test_c07_restore.py +88 -0
  86. probity-0.1.0/tests/test_c08_immutable.py +59 -0
  87. probity-0.1.0/tests/test_c09_sbom.py +95 -0
  88. probity-0.1.0/tests/test_c10_cves.py +61 -0
  89. probity-0.1.0/tests/test_c17_encryption.py +43 -0
  90. probity-0.1.0/tests/test_c18_tls.py +45 -0
  91. probity-0.1.0/tests/test_c19_access.py +43 -0
  92. probity-0.1.0/tests/test_c20_mfa.py +60 -0
  93. probity-0.1.0/tests/test_cli.py +229 -0
  94. probity-0.1.0/tests/test_command_registry.py +43 -0
  95. probity-0.1.0/tests/test_connector_registry.py +61 -0
  96. probity-0.1.0/tests/test_controls_registry.py +36 -0
  97. probity-0.1.0/tests/test_cyclonedx_connector.py +81 -0
  98. probity-0.1.0/tests/test_fact.py +34 -0
  99. probity-0.1.0/tests/test_finding.py +54 -0
  100. probity-0.1.0/tests/test_hard_controls.py +345 -0
  101. probity-0.1.0/tests/test_history.py +98 -0
  102. probity-0.1.0/tests/test_html_report.py +77 -0
  103. probity-0.1.0/tests/test_mock_backup.py +30 -0
  104. probity-0.1.0/tests/test_mock_cloud.py +18 -0
  105. probity-0.1.0/tests/test_mock_idp.py +37 -0
  106. probity-0.1.0/tests/test_mock_sbom.py +29 -0
  107. probity-0.1.0/tests/test_mock_sca.py +31 -0
  108. probity-0.1.0/tests/test_mock_tls.py +18 -0
  109. probity-0.1.0/tests/test_osv_connector.py +112 -0
  110. probity-0.1.0/tests/test_plugins.py +9 -0
  111. probity-0.1.0/tests/test_report_registry.py +26 -0
  112. probity-0.1.0/tests/test_restic_connector.py +50 -0
  113. probity-0.1.0/tests/test_runner.py +56 -0
  114. probity-0.1.0/tests/test_scan_addon_registry.py +46 -0
  115. probity-0.1.0/tests/test_soft_controls.py +184 -0
  116. probity-0.1.0/tests/test_sslyze_connector.py +90 -0
  117. probity-0.1.0/tests/test_testssl_connector.py +76 -0
  118. probity-0.1.0/tests/test_trivy_connector.py +81 -0
  119. probity-0.1.0/tests/test_veeam_connector.py +71 -0
@@ -0,0 +1,30 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ python-version: ["3.11", "3.12", "3.13"]
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ - uses: actions/setup-python@v5
18
+ with:
19
+ python-version: ${{ matrix.python-version }}
20
+ cache: pip
21
+ - name: Install
22
+ run: |
23
+ python -m pip install --upgrade pip
24
+ pip install -e ".[dev]"
25
+ - name: Lint
26
+ run: ruff check .
27
+ - name: Type check
28
+ run: mypy
29
+ - name: Test
30
+ run: pytest
@@ -0,0 +1,25 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ .eggs/
6
+ build/
7
+ dist/
8
+ .venv/
9
+ venv/
10
+
11
+ # Tooling caches
12
+ .pytest_cache/
13
+ .mypy_cache/
14
+ .ruff_cache/
15
+ .coverage
16
+ coverage.xml
17
+ htmlcov/
18
+
19
+ # Local artifacts
20
+ *.log
21
+ .DS_Store
22
+ reports/
23
+
24
+ # Editor: Python Import Helper autocomplete cache (per-machine noise)
25
+ .vscode/PythonImportHelper-v2-Completion.json
@@ -0,0 +1,30 @@
1
+ # Changelog
2
+
3
+ All notable changes to Probity are documented here.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.1.0] - 2026-06-04
9
+
10
+ First feature-complete release.
11
+
12
+ ### Added
13
+ - All 20 NIS2 controls (C01–C20), each a pure `FactSet -> Finding` function
14
+ with attached evidence.
15
+ - Framework mapping layer projecting NIS2 findings onto DORA and the EU AI Act.
16
+ - Live `GitHubConnector` feeding C13 (CI/CD security), with paginated REST
17
+ collection and a hard page cap to prevent runaway loops.
18
+ - `ALL_CONTROLS` registry as the single source of truth for the active
19
+ catalogue, consumed by both the CLI and the scan runner.
20
+ - JSONL history store, hand-built SVG trend charts, and PDF/JSON/HTML reports.
21
+ - Local dashboard and scheduler service.
22
+
23
+ ### Security
24
+ - Zero runtime dependencies (standard library only).
25
+ - Fail-closed control evaluation; credentials read from the environment only.
26
+
27
+ ### Quality
28
+ - 252 tests, 94% coverage; `ruff` and `mypy --strict` clean.
29
+
30
+ [0.1.0]: https://github.com/janpenitent/probity/releases/tag/v0.1.0
@@ -0,0 +1,25 @@
1
+ # Contributing
2
+
3
+ ## Development
4
+
5
+ ```bash
6
+ python -m venv .venv && source .venv/bin/activate
7
+ pip install -e ".[dev]"
8
+ ```
9
+
10
+ ## Quality gates (must pass before merge)
11
+
12
+ ```bash
13
+ ruff check . # lint + import order
14
+ mypy # strict type checking
15
+ pytest # tests + coverage (target 80%+)
16
+ ```
17
+
18
+ ## Conventions
19
+
20
+ - TDD: write the failing test first, then the implementation.
21
+ - Conventional Commits: `feat:`, `fix:`, `test:`, `docs:`, `chore:`, `refactor:`.
22
+ - One control per module under `src/probity/controls/`, one connector per
23
+ module under `src/probity/connectors/`. Keep files small and cohesive.
24
+ - Connectors must never raise on an empty source; controls return a `Finding`,
25
+ never an exception (the engine converts unexpected errors into ERROR findings).