ghostrules 0.4.0__tar.gz → 0.5.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.
- ghostrules-0.5.0/.ghostrules.lock +31 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/.github/ISSUE_TEMPLATE/false-positive.yml +8 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/.github/ISSUE_TEMPLATE/new-rule.yml +2 -0
- ghostrules-0.5.0/.github/dependabot.yml +22 -0
- ghostrules-0.5.0/.github/pull_request_template.md +16 -0
- ghostrules-0.5.0/.github/workflows/ci.yml +110 -0
- ghostrules-0.5.0/.github/workflows/links.yml +23 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/.github/workflows/release.yml +29 -3
- ghostrules-0.5.0/.github/workflows/scorecard.yml +32 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/CHANGELOG.md +130 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/CLAUDE.md +1 -0
- ghostrules-0.5.0/CODE_OF_CONDUCT.md +108 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/CONTRIBUTING.md +16 -0
- ghostrules-0.5.0/GOVERNANCE.md +68 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/PKG-INFO +32 -43
- {ghostrules-0.4.0 → ghostrules-0.5.0}/README.md +30 -42
- {ghostrules-0.4.0 → ghostrules-0.5.0}/SECURITY.md +22 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/action.yml +3 -2
- ghostrules-0.5.0/bench/README.md +98 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/bench/RESULTS.md +36 -31
- {ghostrules-0.4.0 → ghostrules-0.5.0}/bench/attacks/context-and-config.toml +4 -4
- {ghostrules-0.4.0 → ghostrules-0.5.0}/bench/attacks/prose.toml +123 -23
- {ghostrules-0.4.0 → ghostrules-0.5.0}/bench/attacks/unicode.toml +5 -5
- {ghostrules-0.4.0 → ghostrules-0.5.0}/bench/attacks/w5.toml +6 -6
- {ghostrules-0.4.0 → ghostrules-0.5.0}/bench/heldout-labels.toml +24 -1
- {ghostrules-0.4.0 → ghostrules-0.5.0}/bench/heldout-results.json +5 -5
- ghostrules-0.5.0/bench/labels-review.csv +60 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/bench/lib.py +42 -1
- ghostrules-0.5.0/bench/perf.py +221 -0
- ghostrules-0.5.0/bench/run.py +506 -0
- ghostrules-0.5.0/docs/AI_PROVENANCE.md +28 -0
- ghostrules-0.5.0/docs/CLAIMS.md +114 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/docs/DECISIONS.md +144 -0
- ghostrules-0.5.0/docs/GITHUB_SETTINGS.md +23 -0
- ghostrules-0.5.0/docs/PERFORMANCE.md +29 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/docs/RULES.md +27 -2
- ghostrules-0.5.0/docs/THREAT_MODEL.md +94 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/docs/USAGE.md +57 -14
- ghostrules-0.5.0/docs/VERSIONING.md +65 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/docs/design/SPEC.md +1 -1
- ghostrules-0.5.0/docs/improvement/BASELINE.md +31 -0
- ghostrules-0.5.0/docs/improvement/CLOSEOUT.md +90 -0
- ghostrules-0.5.0/docs/improvement/PHASES.md +300 -0
- ghostrules-0.5.0/docs/improvement/PLAN.md +84 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/examples/poisoned-repo/.cursorrules +1 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/examples/poisoned-repo/README.md +1 -1
- ghostrules-0.5.0/lychee.toml +17 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/pyproject.toml +13 -2
- ghostrules-0.5.0/release-notes.md +87 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/scripts/make_demo.py +2 -1
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/__init__.py +1 -1
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/agents/base.py +102 -59
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/agents/codex.py +2 -1
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/agents/repo.py +4 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/baseline.py +59 -7
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/cli.py +197 -85
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/config.py +91 -26
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/context.py +2 -1
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/models.py +21 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/reach.py +41 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/reporters/common.py +13 -2
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/reporters/context.py +2 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/reporters/json_.py +9 -2
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/rules/directive.py +3 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/rules/helpers.py +10 -2
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/rules/injection.py +59 -3
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/rules/patterns.py +35 -5
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/rules/scanner_config.py +1 -1
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/rules/scripts.py +84 -22
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/scanner.py +203 -82
- ghostrules-0.5.0/src/ghostrules/schemas/scan.schema.json +48 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/unicode_utils.py +53 -0
- ghostrules-0.5.0/src/ghostrules/visibility.py +121 -0
- ghostrules-0.5.0/tests/fixtures/golden/context-clean-repo-json.txt +137 -0
- ghostrules-0.5.0/tests/fixtures/golden/context-clean-repo-markdown.txt +26 -0
- ghostrules-0.5.0/tests/fixtures/golden/context-clean-repo-text.txt +44 -0
- ghostrules-0.5.0/tests/fixtures/golden/context-clean-repo-tree.txt +19 -0
- ghostrules-0.5.0/tests/fixtures/golden/context-import-chain-repo-json.txt +601 -0
- ghostrules-0.5.0/tests/fixtures/golden/context-import-chain-repo-markdown.txt +48 -0
- ghostrules-0.5.0/tests/fixtures/golden/context-import-chain-repo-text.txt +86 -0
- ghostrules-0.5.0/tests/fixtures/golden/context-import-chain-repo-tree.txt +47 -0
- ghostrules-0.5.0/tests/fixtures/golden/context-poisoned-repo-json.txt +404 -0
- ghostrules-0.5.0/tests/fixtures/golden/context-poisoned-repo-markdown.txt +51 -0
- ghostrules-0.5.0/tests/fixtures/golden/context-poisoned-repo-text.txt +92 -0
- ghostrules-0.5.0/tests/fixtures/golden/context-poisoned-repo-tree.txt +68 -0
- ghostrules-0.5.0/tests/fixtures/golden/lock-clean-repo.txt +144 -0
- ghostrules-0.5.0/tests/fixtures/golden/lock-import-chain-repo.txt +282 -0
- ghostrules-0.5.0/tests/fixtures/golden/lock-poisoned-repo.txt +162 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-clean-repo-fail-on-low.txt +5 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-clean-repo-json.txt +18 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-clean-repo-lenient.txt +18 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-clean-repo-markdown.txt +4 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-clean-repo-sarif.txt +746 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-clean-repo-small-limit.txt +7 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-clean-repo-strict.txt +18 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-clean-repo-table.txt +5 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-import-chain-repo-fail-on-low.txt +46 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-import-chain-repo-json.txt +152 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-import-chain-repo-lenient.txt +152 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-import-chain-repo-markdown.txt +13 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-import-chain-repo-sarif.txt +1101 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-import-chain-repo-small-limit.txt +20 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-import-chain-repo-strict.txt +152 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-import-chain-repo-table.txt +46 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-poisoned-repo-fail-on-low.txt +176 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-poisoned-repo-json.txt +401 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-poisoned-repo-lenient.txt +401 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-poisoned-repo-markdown.txt +36 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-poisoned-repo-sarif.txt +1655 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-poisoned-repo-small-limit.txt +40 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-poisoned-repo-strict.txt +401 -0
- ghostrules-0.5.0/tests/fixtures/golden/scan-poisoned-repo-table.txt +176 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_bench.py +32 -5
- ghostrules-0.5.0/tests/test_bench_honesty.py +133 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_ci_files.py +72 -2
- ghostrules-0.5.0/tests/test_config_errors.py +63 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_directive.py +2 -2
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_docs.py +2 -0
- ghostrules-0.5.0/tests/test_evasion_regressions.py +193 -0
- ghostrules-0.5.0/tests/test_exit_codes.py +78 -0
- ghostrules-0.5.0/tests/test_golden_outputs.py +86 -0
- ghostrules-0.5.0/tests/test_governance_docs.py +48 -0
- ghostrules-0.5.0/tests/test_no_network.py +27 -0
- ghostrules-0.5.0/tests/test_output_contract.py +109 -0
- ghostrules-0.5.0/tests/test_perf_bench.py +56 -0
- ghostrules-0.5.0/tests/test_phase3_detection.py +164 -0
- ghostrules-0.5.0/tests/test_platform_files.py +140 -0
- ghostrules-0.5.0/tests/test_robustness_limits.py +144 -0
- ghostrules-0.5.0/tests/test_robustness_perf.py +36 -0
- ghostrules-0.5.0/tests/test_robustness_properties.py +189 -0
- ghostrules-0.5.0/tests/test_script_own_service.py +211 -0
- ghostrules-0.5.0/tests/test_usage_matches_help.py +78 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_visibility.py +62 -6
- ghostrules-0.4.0/.ghostrules.lock +0 -31
- ghostrules-0.4.0/.github/dependabot.yml +0 -10
- ghostrules-0.4.0/.github/workflows/ci.yml +0 -41
- ghostrules-0.4.0/bench/README.md +0 -44
- ghostrules-0.4.0/bench/run.py +0 -275
- ghostrules-0.4.0/release-notes.md +0 -108
- ghostrules-0.4.0/src/ghostrules/visibility.py +0 -40
- {ghostrules-0.4.0 → ghostrules-0.5.0}/.ghostrules.toml +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/.gitattributes +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/.github/workflows/corpus.yml +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/.github/workflows/pages.yml +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/.github/workflows/self-test.yml +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/.gitignore +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/.pre-commit-hooks.yaml +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/LICENSE +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/action-requirements.in +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/action-requirements.txt +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/assets/banner-dark.png +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/assets/banner-light.png +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/assets/logo.svg +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/assets/social-preview.png +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/bench/.cache-run.log +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/bench/attacks/sources.toml +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/bench/heldout.toml +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/demo/README.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/demo/demo.gif +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/demo/demo.tape +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/demo/imports.gif +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/demo/imports.tape +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/demo/lock.tape +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/docs/AGENT_MODELS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/docs/design/PLAN.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/docs/design/v0.1.1/GR012-FIX.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/docs/design/v0.2/PLAN.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/docs/design/v0.2/RULES.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/docs/design/v0.2/SPEC.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/docs/design/v0.3/CORPUS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/docs/design/v0.3/PLAN.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/docs/design/v0.3/PLAYGROUND.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/docs/design/v0.3/STUDY.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/docs/design/v0.4/REMEDIATION.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/docs/v0.2.1/FIXES.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/examples/clean-repo/.claude/settings.json +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/examples/clean-repo/.mcp.json +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/examples/clean-repo/AGENTS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/examples/clean-repo/CLAUDE.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/examples/clean-repo/README.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/examples/import-chain-repo/.claude/rules/api.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/examples/import-chain-repo/.env +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/examples/import-chain-repo/AGENTS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/examples/import-chain-repo/CLAUDE.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/examples/import-chain-repo/README.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/examples/import-chain-repo/docs/setup.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/examples/import-chain-repo/docs/style.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/examples/import-chain-repo/shared/team-rules.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/examples/import-chain-repo/src/api/users.ts +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/examples/import-chain-repo/src/legacy/CLAUDE.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/examples/poisoned-repo/.claude/settings.json +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/examples/poisoned-repo/.claude/skills/setup/SKILL.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/examples/poisoned-repo/.github/copilot-instructions.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/examples/poisoned-repo/.mcp.json +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/examples/poisoned-repo/AGENTS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/examples/poisoned-repo/CLAUDE.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/scripts/build_site.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/scripts/changelog_section.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/scripts/gen_rules_table.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/scripts/make_fixtures.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/scripts/set_owner.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/_compat.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/agents/__init__.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/agents/claude_code.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/agents/copilot_cli.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/agents/cursor.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/agents/gemini_cli.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/agents/generic.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/changeset.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/clean.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/context_command.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/contextscan.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/firstparty.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/gitref.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/globs.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/ignores.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/imports.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/jsonloc.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/lock.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/markdown_utils.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/mcp_config.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/playground.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/py.typed +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/reporters/__init__.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/reporters/context_data.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/reporters/lock.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/reporters/markdown.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/reporters/sarif.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/reporters/table.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/reveal.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/reveal_data.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/rules/__init__.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/rules/agent_settings.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/rules/context_rules.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/rules/known_installers.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/rules/mcp.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/rules/registry.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/rules/unicode.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/scancontext.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/schemas/context.schema.json +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/secrets.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/sensitive.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/src/ghostrules/targets.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/analyze.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/charts/01-adoption-dark.svg +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/charts/01-adoption-light.svg +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/charts/02-tools-per-repo-dark.svg +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/charts/02-tools-per-repo-light.svg +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/charts/03-claude-agents-dark.svg +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/charts/03-claude-agents-light.svg +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/charts/04-what-agents-read-dark.svg +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/charts/04-what-agents-read-light.svg +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/charts/05-risk-dark.svg +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/charts/05-risk-light.svg +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/charts/06-precision-dark.svg +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/charts/06-precision-light.svg +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/charts.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/data/adoption_families.csv +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/data/claude_agents_relation.csv +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/data/conditional_rules.csv +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/data/findings_by_rule.csv +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/data/headline.json +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/data/imports.csv +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/data/instruction_file_lines.csv +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/data/numbers.csv +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/data/precision_by_rule.csv +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/data/precision_runs.csv +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/data/risk_indicators.csv +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/data/sample.csv +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/data/skills_concentration.csv +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/data/tools_per_repo.csv +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/features.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/label_classes.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/labels.toml +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/report.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/study/report.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/conftest.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/corpus_fakes.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/data/sarif-schema-2.1.0.json +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr001_flag_forged/AGENTS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr001_flag_ok/AGENTS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr001_tags/AGENTS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr002_bidi/AGENTS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr002_rtl_medium/AGENTS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr003_bom_midfile/AGENTS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr003_bom_ok/AGENTS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr003_emoji_zwj_ok/AGENTS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr003_indic_ok/AGENTS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr003_persian_ok/AGENTS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr003_soft_hyphen/AGENTS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr003_zw_file_high/AGENTS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr003_zw_line_high/AGENTS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr003_zw_medium/AGENTS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr004_vs_bytes/AGENTS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr004_vs_ok/AGENTS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr005_benign_ok/CLAUDE.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr005_comment_imperative/CLAUDE.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr005_comment_injection/CLAUDE.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr005_comment_multiline/CLAUDE.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr005_in_code_block_ok/CLAUDE.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr005_short_ok/CLAUDE.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr005_unterminated/CLAUDE.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr006_ok/AGENTS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr006_url/AGENTS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/fixtures/unicode/gr006_word/AGENTS.md +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/pr_helpers.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/secret_samples.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_agents_claude.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_agents_others.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_agents_repo.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_baseline.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_bench_heldout.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_cli.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_codex_gemini.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_config.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_context_api.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_context_command.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_core_without_cli_deps.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_corpus_packaging.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_corpus_tools.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_crlf.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_cross_sentence.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_demo.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_globs.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_gr030.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_hidden_ignores.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_hook_scripts.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_imports.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_lock.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_lock_base.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_markdown_utils.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_mcp_config.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_models.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_noise_fixes.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_patterns.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_playground.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_pr_mode.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_precision_study.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_precision_v021.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_precision_v030.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_referenced_files.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_reporters.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_rules_config.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_rules_injection.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_rules_unicode.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_scan_imports.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_scanner.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_secret_masking.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_secrets.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_study.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_symlink_alias.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_targets.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/test_unicode_utils.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/tests/web/test_playground_smoke.py +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/web/app.js +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/web/index.html +0 -0
- {ghostrules-0.4.0 → ghostrules-0.5.0}/web/style.css +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"agents": {
|
|
3
|
+
"claude-code": [
|
|
4
|
+
{
|
|
5
|
+
"conditions": [],
|
|
6
|
+
"lines": "2a3d3f1fb26381e9 e3b0c44298fc1c14 ddabff43c0a4efe5 6aa552cc1598dcb7 be186e6b970ab643 fb78540ec32b52f9 e3b0c44298fc1c14 662c42577f74cece e3b0c44298fc1c14 85b7ae55df076ab0 2f6995b0ecd75c8d e3b0c44298fc1c14 5f2235a1b010f82c 56a4406ad70b7f0a ba2cd86d7e76eff5 a7b723b74ee03fc8 7cc741f5ca53a7c7 e3b0c44298fc1c14 782729a560418c17 36a8e590ff4c085c e3b0c44298fc1c14 9f4e3cc48918efc0 efeeec23855e4659 2f23b1dcff8841e8 c3abd357eb574eb6 76881ea91e0040bd e3b0c44298fc1c14 36cd3f2bb454f575 ad332335cfaa348c a58865feac87f52b 052081156966d443 5654f9fffd4a2a7a bd0710fd0315ecbb e4d8cec4158bb770 f1b901847390b0ed e3b0c44298fc1c14 966a8946115b377a 5b59b2f749ffabac 9bf96d3c4c385073 43d8bbb16372109c 5226bbb3f5f9e13d add6d744d3ac0c02 3dafca094d79548b 21a3cd5236dfd642 79e12b3b50117933 9cb81024d1184666 f1e7b346d65f35c5 e3b0c44298fc1c14 60ab6be4219694a0 3a1c5dcc5281208a e256f3fb8239bf8c 10d8918d097bebb5 ff85c33a894fab39 10f274c7d25257d2 6216cf539fa87bd8 e3b0c44298fc1c14 7136000e494604c0 aa8d4cf82644ac63 f75f6ee8f0d942eb 1f59b655e6071114 da29957f3e8be475",
|
|
7
|
+
"load": "always",
|
|
8
|
+
"path": "CLAUDE.md",
|
|
9
|
+
"raw_sha256": "eea25059b020f827e5aabef4f61e75220a18323755b2023c710afb73d8c18134",
|
|
10
|
+
"seen_sha256": "eea25059b020f827e5aabef4f61e75220a18323755b2023c710afb73d8c18134",
|
|
11
|
+
"via": []
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"copilot-cli": [
|
|
15
|
+
{
|
|
16
|
+
"conditions": [],
|
|
17
|
+
"lines": "2a3d3f1fb26381e9 e3b0c44298fc1c14 ddabff43c0a4efe5 6aa552cc1598dcb7 be186e6b970ab643 fb78540ec32b52f9 e3b0c44298fc1c14 662c42577f74cece e3b0c44298fc1c14 85b7ae55df076ab0 2f6995b0ecd75c8d e3b0c44298fc1c14 5f2235a1b010f82c 56a4406ad70b7f0a ba2cd86d7e76eff5 a7b723b74ee03fc8 7cc741f5ca53a7c7 e3b0c44298fc1c14 782729a560418c17 36a8e590ff4c085c e3b0c44298fc1c14 9f4e3cc48918efc0 efeeec23855e4659 2f23b1dcff8841e8 c3abd357eb574eb6 76881ea91e0040bd e3b0c44298fc1c14 36cd3f2bb454f575 ad332335cfaa348c a58865feac87f52b 052081156966d443 5654f9fffd4a2a7a bd0710fd0315ecbb e4d8cec4158bb770 f1b901847390b0ed e3b0c44298fc1c14 966a8946115b377a 5b59b2f749ffabac 9bf96d3c4c385073 43d8bbb16372109c 5226bbb3f5f9e13d add6d744d3ac0c02 3dafca094d79548b 21a3cd5236dfd642 79e12b3b50117933 9cb81024d1184666 f1e7b346d65f35c5 e3b0c44298fc1c14 60ab6be4219694a0 3a1c5dcc5281208a e256f3fb8239bf8c 10d8918d097bebb5 ff85c33a894fab39 10f274c7d25257d2 6216cf539fa87bd8 e3b0c44298fc1c14 7136000e494604c0 aa8d4cf82644ac63 f75f6ee8f0d942eb 1f59b655e6071114 da29957f3e8be475",
|
|
18
|
+
"load": "always",
|
|
19
|
+
"path": "CLAUDE.md",
|
|
20
|
+
"raw_sha256": "eea25059b020f827e5aabef4f61e75220a18323755b2023c710afb73d8c18134",
|
|
21
|
+
"seen_sha256": "eea25059b020f827e5aabef4f61e75220a18323755b2023c710afb73d8c18134",
|
|
22
|
+
"via": []
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"cursor": [],
|
|
26
|
+
"generic": []
|
|
27
|
+
},
|
|
28
|
+
"configs": [],
|
|
29
|
+
"generator": "ghostrules 0.5.0",
|
|
30
|
+
"lock_version": 1
|
|
31
|
+
}
|
|
@@ -47,3 +47,11 @@ body:
|
|
|
47
47
|
description: What the text is for, and how a rule could tell it apart from a real problem.
|
|
48
48
|
validations:
|
|
49
49
|
required: true
|
|
50
|
+
- type: checkboxes
|
|
51
|
+
id: checks
|
|
52
|
+
attributes:
|
|
53
|
+
label: Before sending
|
|
54
|
+
options:
|
|
55
|
+
- label: The snippet is defanged (no real secret, domain or private text).
|
|
56
|
+
required: true
|
|
57
|
+
- label: I am willing to have it added as a false-positive test case.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Keeps the commit-pinned actions (.github/workflows, action.yml) and the Python dependencies
|
|
2
|
+
# (pyproject.toml, action-requirements.in/.txt) up to date, one grouped weekly pull request each.
|
|
3
|
+
version: 2
|
|
4
|
+
updates:
|
|
5
|
+
- package-ecosystem: github-actions
|
|
6
|
+
directory: /
|
|
7
|
+
schedule:
|
|
8
|
+
interval: weekly
|
|
9
|
+
groups:
|
|
10
|
+
actions:
|
|
11
|
+
patterns: ["*"]
|
|
12
|
+
commit-message:
|
|
13
|
+
prefix: "chore"
|
|
14
|
+
- package-ecosystem: pip
|
|
15
|
+
directory: /
|
|
16
|
+
schedule:
|
|
17
|
+
interval: weekly
|
|
18
|
+
groups:
|
|
19
|
+
python:
|
|
20
|
+
patterns: ["*"]
|
|
21
|
+
commit-message:
|
|
22
|
+
prefix: "chore"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
## What and why
|
|
2
|
+
|
|
3
|
+
<!-- One or two sentences. Link the issue if there is one. -->
|
|
4
|
+
|
|
5
|
+
## Checklist
|
|
6
|
+
|
|
7
|
+
- [ ] `pytest -q`, `ruff check .`, `ruff format --check .` and `mypy src` pass
|
|
8
|
+
- [ ] Every new or changed detection has a **positive** test and a **false-positive (negative)** test
|
|
9
|
+
- [ ] If a rule's severity or pattern changed: `docs/RULES.md`, `docs/DECISIONS.md` and the `CHANGELOG.md` (Unreleased) say so, and the effect on `bench/` and `corpus/` is in this description
|
|
10
|
+
- [ ] The bench cases were not tuned on their own misses (new, varied cases were added first)
|
|
11
|
+
- [ ] `examples/poisoned-repo` still triggers every rule and `examples/clean-repo` is still clean
|
|
12
|
+
- [ ] Fixtures are defanged (`*.example`, fake tokens), and invisible characters are generated, not typed
|
|
13
|
+
- [ ] Nothing executes, downloads or evaluates scanned content, and nothing uses the network
|
|
14
|
+
- [ ] If this touches a file an agent reads, `ghostrules lock --update` was run and the lock diff reviewed
|
|
15
|
+
- [ ] If the JSON schema, exit codes, flags or rule IDs changed: `docs/VERSIONING.md` was followed
|
|
16
|
+
- [ ] I read what the assistant (if any) wrote, and I am responsible for it
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ci-${{ github.workflow }}-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
test:
|
|
17
|
+
runs-on: ${{ matrix.os }}
|
|
18
|
+
strategy:
|
|
19
|
+
fail-fast: false
|
|
20
|
+
matrix:
|
|
21
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
22
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
25
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
26
|
+
with:
|
|
27
|
+
python-version: ${{ matrix.python-version }}
|
|
28
|
+
- name: Install
|
|
29
|
+
run: pip install -e ".[dev]"
|
|
30
|
+
- name: Lint
|
|
31
|
+
run: ruff check .
|
|
32
|
+
- name: Format check
|
|
33
|
+
run: ruff format --check .
|
|
34
|
+
- name: Test
|
|
35
|
+
run: pytest -q
|
|
36
|
+
- name: Smoke test the demos
|
|
37
|
+
shell: bash
|
|
38
|
+
run: |
|
|
39
|
+
ghostrules scan examples/clean-repo
|
|
40
|
+
code=0
|
|
41
|
+
ghostrules scan examples/poisoned-repo --no-color > /dev/null || code=$?
|
|
42
|
+
test "$code" = "1"
|
|
43
|
+
|
|
44
|
+
typecheck:
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
steps:
|
|
47
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
48
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
49
|
+
with:
|
|
50
|
+
python-version: "3.12"
|
|
51
|
+
- run: pip install -e ".[dev]"
|
|
52
|
+
- name: mypy (strict)
|
|
53
|
+
run: mypy src
|
|
54
|
+
|
|
55
|
+
audit:
|
|
56
|
+
runs-on: ubuntu-latest
|
|
57
|
+
steps:
|
|
58
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
59
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
60
|
+
with:
|
|
61
|
+
python-version: "3.12"
|
|
62
|
+
- name: Install the package and pip-audit
|
|
63
|
+
run: pip install . pip-audit
|
|
64
|
+
- name: Audit the runtime dependencies and the pinned action requirements
|
|
65
|
+
run: |
|
|
66
|
+
pip-audit --skip-editable
|
|
67
|
+
pip-audit --require-hashes -r action-requirements.txt
|
|
68
|
+
|
|
69
|
+
self-scan:
|
|
70
|
+
runs-on: ubuntu-latest
|
|
71
|
+
steps:
|
|
72
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
73
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
74
|
+
with:
|
|
75
|
+
python-version: "3.12"
|
|
76
|
+
- run: pip install -e .
|
|
77
|
+
- name: ghostrules scans its own repository
|
|
78
|
+
run: |
|
|
79
|
+
ghostrules scan . --no-color
|
|
80
|
+
ghostrules scan . --all-files --no-color
|
|
81
|
+
ghostrules lock --check --no-color
|
|
82
|
+
|
|
83
|
+
# Speed budget (docs/PERFORMANCE.md): loose on purpose, it catches a rule that turned quadratic.
|
|
84
|
+
perf:
|
|
85
|
+
runs-on: ubuntu-latest
|
|
86
|
+
steps:
|
|
87
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
88
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
89
|
+
with:
|
|
90
|
+
python-version: "3.12"
|
|
91
|
+
- name: Install
|
|
92
|
+
run: pip install -e .
|
|
93
|
+
- name: Budget
|
|
94
|
+
run: python bench/perf.py --check
|
|
95
|
+
|
|
96
|
+
# One stable name for the branch ruleset: "test" is a matrix, so its checks are named per
|
|
97
|
+
# combination and no check is called plain "test". This job fails unless every job succeeded.
|
|
98
|
+
ci-ok:
|
|
99
|
+
if: always()
|
|
100
|
+
needs: [test, typecheck, audit, self-scan, perf]
|
|
101
|
+
runs-on: ubuntu-latest
|
|
102
|
+
steps:
|
|
103
|
+
- name: Every required job succeeded
|
|
104
|
+
env:
|
|
105
|
+
RESULTS: ${{ join(needs.*.result, ' ') }}
|
|
106
|
+
run: |
|
|
107
|
+
echo "results: $RESULTS"
|
|
108
|
+
for r in $RESULTS; do
|
|
109
|
+
[ "$r" = "success" ] || { echo "a required job did not succeed: $r"; exit 1; }
|
|
110
|
+
done
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: Links
|
|
2
|
+
|
|
3
|
+
# Dead links in the documentation. Not part of the required checks (`ci-ok`): a third-party site
|
|
4
|
+
# being down must not block a merge. It runs on pull requests that touch Markdown, weekly, and by hand.
|
|
5
|
+
on:
|
|
6
|
+
pull_request:
|
|
7
|
+
paths: ["**/*.md", "lychee.toml", ".github/workflows/links.yml"]
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: "41 6 * * 3"
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
lychee:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
20
|
+
- uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0
|
|
21
|
+
with:
|
|
22
|
+
args: --config lychee.toml --no-progress "**/*.md"
|
|
23
|
+
fail: true
|
|
@@ -41,6 +41,15 @@ jobs:
|
|
|
41
41
|
python -m pip install --disable-pip-version-check --quiet build
|
|
42
42
|
python -m build
|
|
43
43
|
|
|
44
|
+
- name: SBOM (CycloneDX)
|
|
45
|
+
run: |
|
|
46
|
+
# a clean environment, so the SBOM lists ghostrules and its runtime dependencies only
|
|
47
|
+
python -m venv sbom-env
|
|
48
|
+
sbom-env/bin/python -m pip install --disable-pip-version-check --quiet .
|
|
49
|
+
python -m pip install --disable-pip-version-check --quiet cyclonedx-bom
|
|
50
|
+
mkdir sbom
|
|
51
|
+
cyclonedx-py environment --of JSON -o sbom/ghostrules-sbom.cdx.json sbom-env
|
|
52
|
+
|
|
44
53
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
45
54
|
with:
|
|
46
55
|
name: dist
|
|
@@ -48,33 +57,50 @@ jobs:
|
|
|
48
57
|
dist/
|
|
49
58
|
release-notes.md
|
|
50
59
|
|
|
60
|
+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
61
|
+
with:
|
|
62
|
+
name: sbom
|
|
63
|
+
path: sbom/
|
|
64
|
+
|
|
51
65
|
publish-pypi:
|
|
52
66
|
needs: build
|
|
53
67
|
runs-on: ubuntu-latest
|
|
54
68
|
environment: pypi
|
|
55
69
|
permissions:
|
|
56
|
-
id-token: write # Trusted Publishing
|
|
70
|
+
id-token: write # Trusted Publishing and PyPI attestations
|
|
57
71
|
steps:
|
|
58
72
|
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
|
59
73
|
with:
|
|
60
74
|
name: dist
|
|
61
75
|
- uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # release/v1
|
|
76
|
+
with:
|
|
77
|
+
attestations: true # PEP 740 attestations, signed with this workflow's OIDC identity
|
|
62
78
|
|
|
63
79
|
github-release:
|
|
64
80
|
needs: publish-pypi
|
|
65
81
|
runs-on: ubuntu-latest
|
|
66
82
|
permissions:
|
|
67
83
|
contents: write
|
|
84
|
+
id-token: write # sign the build provenance
|
|
85
|
+
attestations: write
|
|
68
86
|
steps:
|
|
69
87
|
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
|
70
88
|
with:
|
|
71
89
|
name: dist
|
|
72
|
-
-
|
|
90
|
+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
|
91
|
+
with:
|
|
92
|
+
name: sbom
|
|
93
|
+
path: sbom
|
|
94
|
+
- name: Attest the build provenance of the distributions
|
|
95
|
+
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
|
|
96
|
+
with:
|
|
97
|
+
subject-path: dist/*
|
|
98
|
+
- name: Create the GitHub release (distributions and SBOM)
|
|
73
99
|
env:
|
|
74
100
|
GH_TOKEN: ${{ github.token }}
|
|
75
101
|
TAG: ${{ github.ref_name }}
|
|
76
102
|
REPO: ${{ github.repository }}
|
|
77
|
-
run: gh release create "$TAG" dist/* --repo "$REPO" --title "$TAG" --notes-file release-notes.md
|
|
103
|
+
run: gh release create "$TAG" dist/* sbom/ghostrules-sbom.cdx.json --repo "$REPO" --title "$TAG" --notes-file release-notes.md
|
|
78
104
|
|
|
79
105
|
move-major-tag:
|
|
80
106
|
# Users pin BardLaudian/ghostrules@v0 (or an exact tag). Only a stable x.y.z release moves it.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Scorecard
|
|
2
|
+
|
|
3
|
+
# OpenSSF Scorecard: scores the repository's supply-chain practices and publishes the result
|
|
4
|
+
# (the badge in the README is added once a result exists). Runs weekly and when main changes.
|
|
5
|
+
on:
|
|
6
|
+
schedule:
|
|
7
|
+
- cron: "23 5 * * 2"
|
|
8
|
+
push:
|
|
9
|
+
branches: [main]
|
|
10
|
+
|
|
11
|
+
permissions: read-all
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
analysis:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
permissions:
|
|
17
|
+
security-events: write # upload the SARIF to code scanning
|
|
18
|
+
id-token: write # publish the result to the OpenSSF API
|
|
19
|
+
contents: read
|
|
20
|
+
actions: read
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
23
|
+
with:
|
|
24
|
+
persist-credentials: false
|
|
25
|
+
- uses: ossf/scorecard-action@23f22cd43608bae7a1f1fa2603d7314dee9538a5 # v2.6.0
|
|
26
|
+
with:
|
|
27
|
+
results_file: results.sarif
|
|
28
|
+
results_format: sarif
|
|
29
|
+
publish_results: true
|
|
30
|
+
- uses: github/codeql-action/upload-sarif@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4.39.4
|
|
31
|
+
with:
|
|
32
|
+
sarif_file: results.sarif
|
|
@@ -5,6 +5,126 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [0.5.0] - 2026-11-24
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **A bad configuration says where.** An invalid `.ghostrules.toml` or `[tool.ghostrules]` table
|
|
13
|
+
fails with `file:line: 'key' ...` (exit 2); an unknown key also lists the known ones.
|
|
14
|
+
- **Exit code 3** for an internal failure (an unexpected exception). It used to leave as `1`, which a
|
|
15
|
+
CI job reads as "findings". The four codes are documented in the usage guide and fixed by a test.
|
|
16
|
+
The console script is now `ghostrules.cli:main`; `ghostrules.cli:app` still works.
|
|
17
|
+
- **`schema_version` in the JSON report**, a JSON Schema for it (`schemas/scan.schema.json`) and a
|
|
18
|
+
written compatibility promise: fields are only added within a schema version.
|
|
19
|
+
`summary.baseline_stale` is new.
|
|
20
|
+
- **Baselines record `created`, `generator` and `count`, and go stale visibly.** A whole-directory
|
|
21
|
+
scan warns when entries match no finding any more (it never changes the exit code). How a baseline
|
|
22
|
+
expires is documented.
|
|
23
|
+
- **`bench/perf.py`**: a reproducible speed benchmark (3,000 files, 30 CLAUDE.md, a 20,000-file repo,
|
|
24
|
+
a 1 MiB file) with a loose time budget checked in CI (job `perf`); figures in `docs/PERFORMANCE.md`.
|
|
25
|
+
- **Tests** for CRLF, a UTF-8 BOM, mixed-case names, path separators and platforms without symlinks,
|
|
26
|
+
and a test that `scan --help` and the option table of the usage guide list the same options.
|
|
27
|
+
- **`--max-file-size` / `max_file_size` (default 1 MiB, `0` = no limit).** A larger file is skipped
|
|
28
|
+
with a warning naming it and its size, shown in every output format. It is never skipped
|
|
29
|
+
silently.
|
|
30
|
+
- Property tests (`hypothesis`, new `dev` extra) for the normaliser, `@path` resolution, the JSON
|
|
31
|
+
locator and the reporters, and `slow` time-budget tests on hostile input (`pytest -m slow`;
|
|
32
|
+
excluded from the normal run).
|
|
33
|
+
|
|
34
|
+
- **GR017, a known-format secret written in an instruction file.** `ghp_`, `github_pat_`,
|
|
35
|
+
`sk-ant-`, `sk-`, `AKIA`, `xox*`, `AIza`, `glpat-`, `hf_`, `npm_` and webhook URLs in `AGENTS.md`,
|
|
36
|
+
`CLAUDE.md`, `.cursorrules` and the other instruction files are `critical` and always masked.
|
|
37
|
+
- **GR012:** a download tool kept in a variable then a shell (`c=curl; $c … && sh`),
|
|
38
|
+
`python -c` / `node -e` that `exec`/`eval` what `urlopen`, `requests.get` or `fetch` returns, and
|
|
39
|
+
`sh|zsh|source <(curl …)`.
|
|
40
|
+
- **GR014:** the verb `open`, `.git-credentials`, `~/.config/gh/hosts.yml`, and a low-severity
|
|
41
|
+
heuristic for `private key` + `ssh` in one sentence.
|
|
42
|
+
- **French patterns** for GR010, GR011 and GR013, and Spanish for GR013.
|
|
43
|
+
- Nine bench cases (origin `author`) for the above; four former known misses are now detected.
|
|
44
|
+
- Unicode-evasion cases (zero-width, soft hyphen, fullwidth, Cyrillic, mixed) now pass; added legitimate emoji ZWJ, Arabic, Persian, Hindi and Russian text as no-escalation tests.
|
|
45
|
+
- Regression net for the evasion and false-positive audit (`tests/test_evasion_regressions.py`): strict-xfail evasion cases plus six legitimate-content cases that must stay clean.
|
|
46
|
+
- `docs/improvement/BASELINE.md`: measured baseline before the improvement plan.
|
|
47
|
+
- **Documentation and governance.** `docs/THREAT_MODEL.md` (assets, attackers, trust boundaries, attacks on the scanner, non-goals), `docs/VERSIONING.md` (the stable surface, deprecation policy, criteria for 1.0), `GOVERNANCE.md`, `CODE_OF_CONDUCT.md`, a pull request template with a false-positive checkbox, and a link check in CI.
|
|
48
|
+
- `docs/improvement/BASELINE.md`: measured baseline before the improvement plan.
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
|
|
52
|
+
- **Benchmark honesty.** Every recall and precision figure the benchmark prints now carries
|
|
53
|
+
its sample size and a 95 % Wilson interval. Labels record who gave them (`assistant` or `human`)
|
|
54
|
+
and the report keeps the two apart. `python bench/run.py review-sheet` writes
|
|
55
|
+
`bench/labels-review.csv` (blind, `human_label` empty) for a person to label; nothing was filled
|
|
56
|
+
in. `docs/CLAIMS.md` maps each README claim to its evidence. `docs/AI_PROVENANCE.md` lays out the
|
|
57
|
+
options for the AI co-author trailers; the maintainer chose to keep the history and declare AI
|
|
58
|
+
use in general (no history was touched). All 21 held-out findings now have a human label
|
|
59
|
+
(4 of 21 true positives, 19 %, 95 % CI 8–40 %).
|
|
60
|
+
- **Type checking is strict and runs in CI.** `mypy src` passes with `strict = true`
|
|
61
|
+
and is a CI step. The long functions behind `scan`, `lock`, `scan_paths`, the context builder
|
|
62
|
+
and the symlink resolver are split into steps with one job each, with no change in output
|
|
63
|
+
(pinned by golden tests of `scan`, `context` and `lock` on `examples/*`). Ruff now fails the build
|
|
64
|
+
on a function over 15 branches or 60 statements.
|
|
65
|
+
- **An imperative remote-code command in prose now fails the default check.** GR012 on a line
|
|
66
|
+
such as `Run: curl URL | bash` in plain prose of an agent file keeps its own severity instead of
|
|
67
|
+
being lowered to `low`. Code blocks, code spans, quotations and descriptions are unchanged, and
|
|
68
|
+
the other visible-prose rules (GR010, GR011, GR013, GR014, GR016) keep the 0.4 policy.
|
|
69
|
+
**Migration:** if the new exit code breaks a pipeline, pass `--lenient` or set
|
|
70
|
+
`profile = "lenient"` to get the 0.4 behaviour; review the finding rather than silencing it.
|
|
71
|
+
- The README is shorter: the benchmark detail lives in `bench/README.md`, and a "How this was built" section declares the use of AI assistants.
|
|
72
|
+
- This changelog: Keep a Changelog categories only, internal tracking labels removed, comparison links between tags.
|
|
73
|
+
|
|
74
|
+
### Fixed
|
|
75
|
+
|
|
76
|
+
- **Terminal escape sequences in the table report.** A control character in a scanned file
|
|
77
|
+
(ESC, CSI, CR, BS...) reached the terminal through the snippet or message. Every report now
|
|
78
|
+
prints control characters as `⟦U+XXXX⟧`. Found by the new property tests.
|
|
79
|
+
- **Quadratic cost on a line with many findings.** 60,000 repetitions of one sentence took
|
|
80
|
+
minutes (masking the whole line and counting quotes from the start of the paragraph for each
|
|
81
|
+
finding); it is now linear (about 21 s for a 2 MB file, which the default size limit skips).
|
|
82
|
+
- **Unicode evasion of the injection patterns.** GR010-GR016 now also match a de-obfuscated
|
|
83
|
+
view of the text (invisible characters dropped, NFKC, Cyrillic/Greek look-alikes folded to
|
|
84
|
+
Latin) and report against the original line and column. A match that only appears after
|
|
85
|
+
de-obfuscation is raised to at least `high`, is not lowered by the visible-prose policy, and says
|
|
86
|
+
the text was obfuscated. Plain ASCII and single-script text skip the extra pass (no measurable
|
|
87
|
+
cost on a 3,000-file tree).
|
|
88
|
+
|
|
89
|
+
### Security
|
|
90
|
+
|
|
91
|
+
- **CI and release supply chain.** `ci.yml` has read-only `permissions` and cancels
|
|
92
|
+
obsolete runs, and `mypy`, `pip-audit` and the self-scan run as their own jobs. Dependabot also
|
|
93
|
+
watches the Python dependencies, grouped weekly. Releases publish PyPI attestations, a GitHub
|
|
94
|
+
build-provenance attestation and a CycloneDX SBOM. An OpenSSF Scorecard workflow was added and its badge shown in the README.
|
|
95
|
+
The README and usage guide show the Action pinned by commit SHA. Settings that need a
|
|
96
|
+
maintainer are listed in `docs/GITHUB_SETTINGS.md`.
|
|
97
|
+
|
|
98
|
+
## [0.4.1] - 2026-10-29
|
|
99
|
+
|
|
100
|
+
Follow-up to 0.4.0: fewer false positives on scripts, fewer misses on visible attacks, and a
|
|
101
|
+
benchmark headline that no longer counts cases the author wrote. No breaking changes.
|
|
102
|
+
|
|
103
|
+
### Changed
|
|
104
|
+
|
|
105
|
+
- **Visible prose that reads as an attack stays `high`.** Inside one paragraph, exfiltration plus
|
|
106
|
+
concealment (GR013 + GR011), override plus exfiltration (GR010 + GR013) and a sensitive file plus
|
|
107
|
+
a URL outside `allow_domains` (GR014 + URL) keep the rule's severity even though the text is
|
|
108
|
+
visible. Examples, quotations, code blocks and descriptions stay `low`. On the held-out set no
|
|
109
|
+
repository starts to fail the check, but two GR014 findings already labelled false positive now
|
|
110
|
+
report `high`.
|
|
111
|
+
- **GR110 no longer reports a token sent to the service it belongs to**: `GITHUB_*`/`GH_*` to
|
|
112
|
+
`api.github.com`, `github.com` or `uploads.github.com`; `AZURE_*`, `ADO_*` and `SYSTEM_ACCESSTOKEN`
|
|
113
|
+
to `dev.azure.com` or `*.visualstudio.com`; `<X>_API_KEY` to a host that contains `x`. It still
|
|
114
|
+
reports any other host, a collector domain, the whole environment, a credentials file, a variable
|
|
115
|
+
with no known service and a destination it cannot read. The held-out GR110 finding is still
|
|
116
|
+
reported: its shape is not covered.
|
|
117
|
+
- **The benchmark headline counts only the independent cases.** Recall is split by origin (`author`,
|
|
118
|
+
`review`, `public`; `ours` is now `author`) and the README states the independent figure first,
|
|
119
|
+
with its sample size. Every number in `README.md` and `bench/README.md` is generated from the data
|
|
120
|
+
(`python bench/run.py report --write`) and a test fails when one is stale.
|
|
121
|
+
|
|
122
|
+
### Added
|
|
123
|
+
|
|
124
|
+
- **Inline hook code is read as a script**: the code in `python3 -c`, `node -e`, `bash -c` and `sh -c`
|
|
125
|
+
(and the other interpreters in the hook table) is checked by GR110–GR113. The finding points at the
|
|
126
|
+
command in the settings file.
|
|
127
|
+
|
|
8
128
|
## [0.4.0] - 2026-10-29
|
|
9
129
|
|
|
10
130
|
Remediation release, from an independent review of 0.3.0 ([plan](docs/design/v0.4/REMEDIATION.md)).
|
|
@@ -312,3 +432,13 @@ First release.
|
|
|
312
432
|
and the tool makes no network requests. Symbolic links are not followed.
|
|
313
433
|
- Secrets are never printed: every finding, warning and error passes through one masking step
|
|
314
434
|
(`ghp_****…a1b2`), and a test fails if a secret appears in any report format.
|
|
435
|
+
|
|
436
|
+
[Unreleased]: https://github.com/BardLaudian/ghostrules/compare/v0.5.0...HEAD
|
|
437
|
+
[0.5.0]: https://github.com/BardLaudian/ghostrules/compare/v0.4.1...v0.5.0
|
|
438
|
+
[0.4.1]: https://github.com/BardLaudian/ghostrules/compare/v0.4.0...v0.4.1
|
|
439
|
+
[0.4.0]: https://github.com/BardLaudian/ghostrules/compare/v0.3.0...v0.4.0
|
|
440
|
+
[0.3.0]: https://github.com/BardLaudian/ghostrules/compare/v0.2.1...v0.3.0
|
|
441
|
+
[0.2.1]: https://github.com/BardLaudian/ghostrules/compare/v0.2.0...v0.2.1
|
|
442
|
+
[0.2.0]: https://github.com/BardLaudian/ghostrules/compare/v0.1.1...v0.2.0
|
|
443
|
+
[0.1.1]: https://github.com/BardLaudian/ghostrules/compare/v0.1.0...v0.1.1
|
|
444
|
+
[0.1.0]: https://github.com/BardLaudian/ghostrules/releases/tag/v0.1.0
|
|
@@ -14,6 +14,7 @@ anything it finds, never makes network requests, and never phones home.
|
|
|
14
14
|
- `docs/design/SPEC.md` — features, CLI, file targets, output formats, config. **The contract.**
|
|
15
15
|
- `docs/RULES.md` — every detection rule: ID, severity, logic, true/false positive examples.
|
|
16
16
|
- `docs/design/PLAN.md` — build order, phase by phase, with acceptance criteria.
|
|
17
|
+
- `docs/improvement/PLAN.md` — improvement plan (v0.4.1 → v1.0): working rules, findings H1–H14, phase report format.
|
|
17
18
|
|
|
18
19
|
If something in the code disagrees with these docs, the docs win unless the user says otherwise.
|
|
19
20
|
If a doc is ambiguous, pick the simplest reasonable option and note it in `docs/DECISIONS.md`.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a
|
|
6
|
+
harassment-free experience for everyone, regardless of age, body size, visible or invisible
|
|
7
|
+
disability, ethnicity, sex characteristics, gender identity and expression, level of experience,
|
|
8
|
+
education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or
|
|
9
|
+
sexual identity and orientation.
|
|
10
|
+
|
|
11
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and
|
|
12
|
+
healthy community.
|
|
13
|
+
|
|
14
|
+
## Our Standards
|
|
15
|
+
|
|
16
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
|
17
|
+
|
|
18
|
+
* Demonstrating empathy and kindness toward other people
|
|
19
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
20
|
+
* Giving and gracefully accepting constructive feedback
|
|
21
|
+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the
|
|
22
|
+
experience
|
|
23
|
+
* Focusing on what is best not just for us as individuals, but for the overall community
|
|
24
|
+
|
|
25
|
+
Examples of unacceptable behavior include:
|
|
26
|
+
|
|
27
|
+
* The use of sexualized language or imagery, and sexual attention or advances of any kind
|
|
28
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
29
|
+
* Public or private harassment
|
|
30
|
+
* Publishing others' private information, such as a physical or email address, without their
|
|
31
|
+
explicit permission
|
|
32
|
+
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
33
|
+
|
|
34
|
+
## Enforcement Responsibilities
|
|
35
|
+
|
|
36
|
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior
|
|
37
|
+
and will take appropriate and fair corrective action in response to any behavior that they deem
|
|
38
|
+
inappropriate, threatening, offensive, or harmful.
|
|
39
|
+
|
|
40
|
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits,
|
|
41
|
+
code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and
|
|
42
|
+
will communicate reasons for moderation decisions when appropriate.
|
|
43
|
+
|
|
44
|
+
## Scope
|
|
45
|
+
|
|
46
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is
|
|
47
|
+
officially representing the community in public spaces. Examples of representing our community
|
|
48
|
+
include using an official email address, posting via an official social media account, or acting as
|
|
49
|
+
an appointed representative at an online or offline event.
|
|
50
|
+
|
|
51
|
+
## Enforcement
|
|
52
|
+
|
|
53
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community
|
|
54
|
+
leaders responsible for enforcement through GitHub's
|
|
55
|
+
[private reporting](https://github.com/BardLaudian/ghostrules/security/advisories/new) (choose
|
|
56
|
+
"conduct" in the title). All complaints will be reviewed and investigated promptly and fairly.
|
|
57
|
+
|
|
58
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any
|
|
59
|
+
incident.
|
|
60
|
+
|
|
61
|
+
## Enforcement Guidelines
|
|
62
|
+
|
|
63
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for
|
|
64
|
+
any action they deem in violation of this Code of Conduct:
|
|
65
|
+
|
|
66
|
+
### 1. Correction
|
|
67
|
+
|
|
68
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or
|
|
69
|
+
unwelcome in the community.
|
|
70
|
+
|
|
71
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the
|
|
72
|
+
nature of the violation and an explanation of why the behavior was inappropriate. A public apology
|
|
73
|
+
may be requested.
|
|
74
|
+
|
|
75
|
+
### 2. Warning
|
|
76
|
+
|
|
77
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
|
78
|
+
|
|
79
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people
|
|
80
|
+
involved, including unsolicited interaction with those enforcing the Code of Conduct, for a
|
|
81
|
+
specified period of time. This includes avoiding interactions in community spaces as well as
|
|
82
|
+
external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
|
83
|
+
|
|
84
|
+
### 3. Temporary Ban
|
|
85
|
+
|
|
86
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate
|
|
87
|
+
behavior.
|
|
88
|
+
|
|
89
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the
|
|
90
|
+
community for a specified period of time. No public or private interaction with the people involved,
|
|
91
|
+
including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this
|
|
92
|
+
period. Violating these terms may lead to a permanent ban.
|
|
93
|
+
|
|
94
|
+
### 4. Permanent Ban
|
|
95
|
+
|
|
96
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including
|
|
97
|
+
sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement
|
|
98
|
+
of classes of individuals.
|
|
99
|
+
|
|
100
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
|
101
|
+
|
|
102
|
+
## Attribution
|
|
103
|
+
|
|
104
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at
|
|
105
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
106
|
+
|
|
107
|
+
[homepage]: https://www.contributor-covenant.org
|
|
108
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
@@ -115,6 +115,22 @@ model is one module, one section of `docs/AGENT_MODELS.md` and its tests:
|
|
|
115
115
|
- Type hints everywhere, small functions, docstrings on public functions, English README.
|
|
116
116
|
- Conventional commits (`feat:`, `fix:`, `test:`, `docs:`...).
|
|
117
117
|
|
|
118
|
+
## How this project is built (AI assistance)
|
|
119
|
+
|
|
120
|
+
ghostrules is maintained by one person who works with an AI coding assistant for code, tests and
|
|
121
|
+
documentation. The maintainer reads and decides what is merged; the assistant does not publish,
|
|
122
|
+
push or release.
|
|
123
|
+
|
|
124
|
+
- **Commits carry no AI trailer from now on.** Use of an assistant is declared here, for the whole
|
|
125
|
+
project, instead of commit by commit. The 80 commits made before this decision (up to
|
|
126
|
+
2026-11-23) keep their `Co-Authored-By` trailer: history is not rewritten, because that would
|
|
127
|
+
change every commit hash and break the release tags and their attestations.
|
|
128
|
+
- **A commit without a trailer does not mean no AI was involved.** Read it with this section.
|
|
129
|
+
- **Anything no person has reviewed is labelled as such**: the benchmark's labels (assistant or
|
|
130
|
+
human, reported separately in `bench/RESULTS.md`), generated tables and README numbers.
|
|
131
|
+
- **Contributors** may use an assistant too. You remain responsible for what you submit: tests
|
|
132
|
+
pass, fixtures are defanged, and nothing you add runs, downloads or evaluates scanned content.
|
|
133
|
+
|
|
118
134
|
## Pull request checklist
|
|
119
135
|
|
|
120
136
|
- [ ] `pytest -q`, `ruff check .`, `ruff format --check .` and `mypy src` pass
|