|
Option C Tools
|
Functions | |
| test_scan_flags_password_literal () | |
| test_scan_flags_api_key () | |
| test_scan_ignores_non_secret_names () | |
| test_scan_ignores_short_values () | |
| test_scan_line_numbers_correct () | |
| Path | _make_minimal_project (Path tmp_path, str file_name, str content) |
| test_run_exporter_warns_on_hardcoded_secret (tmp_path, capsys) | |
| test_run_exporter_no_warn_by_default_without_flag (tmp_path, capsys) | |
| test_run_exporter_block_secrets_skips_file (tmp_path, capsys) | |
Purpose ------- Tests for content-level secret scanning (OI-416) in ``oct.tools.source_exporter``. Responsibilities ---------------- - Verify ``_scan_content_for_secrets`` flags likely secret assignments. - Verify non-secret assignments are not flagged. - Verify ``run_exporter`` emits warnings when ``--warn-secrets`` is on. - Verify ``--block-secrets`` excludes files with potential secrets from the exported content. Diagnostics ----------- Domain: OCT-TEST L2: test lifecycle L3: assertion details L4: deep tracing Contracts --------- Inputs: tmp_path fixtures Outputs: pass/fail assertions
|
protected |
Create a minimal Option C project layout with one python file.
Definition at line 87 of file test_source_exporter.py.
| tests_tools.test_source_exporter.test_run_exporter_block_secrets_skips_file | ( | tmp_path, | |
| capsys ) |
| tests_tools.test_source_exporter.test_run_exporter_no_warn_by_default_without_flag | ( | tmp_path, | |
| capsys ) |
| tests_tools.test_source_exporter.test_run_exporter_warns_on_hardcoded_secret | ( | tmp_path, | |
| capsys ) |
| tests_tools.test_source_exporter.test_scan_flags_api_key | ( | ) |
| tests_tools.test_source_exporter.test_scan_flags_password_literal | ( | ) |
| tests_tools.test_source_exporter.test_scan_ignores_non_secret_names | ( | ) |
| tests_tools.test_source_exporter.test_scan_ignores_short_values | ( | ) |
Very short values (< 4 chars) don't look like real secrets.
Definition at line 64 of file test_source_exporter.py.
| tests_tools.test_source_exporter.test_scan_line_numbers_correct | ( | ) |