Add Behave framework preset - #41
Conversation
Reviewer's GuideAdds a new Behave framework preset wired into the catalog, and updates documentation to list Behave among supported frameworks. Flow diagram for using the new Behave framework presetflowchart LR
User["pc-init --framework behave"] --> Catalog
Catalog["Framework catalog"] --> BehavePreset["framework/behave/preset.yaml"]
BehavePreset --> BehaveFormat["behave-format hook"]
BehavePreset --> BehaveLint["behave-lint hook"]
BehavePreset --> BehaveDoctor["behave-doctor hook"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
There was a problem hiding this comment.
No application code in the PR — skipped Code Health checks.
See analysis details in CodeScene
Quality Gate Profile: Customizable Safeguards
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
There was a problem hiding this comment.
LlamaPReview — No blocking issues found
1 non-blocking finding retained — highest: Third-party repos owned by first-time contributor referenced via mutable tags.
One non-blocking P2 observation about external third-party hook repos referenced without integrity pinning, classified per adjudication policy as a supply-chain hygiene note rather than a security finding.
Review details and evidence
| Priority | File | Finding | Evidence |
|---|---|---|---|
| P2 | framework/behave/preset.yaml |
Third-party repos owned by first-time contributor referenced via mutable tags | confirmed |
LlamaPReview checks
- Read the complete PR-head file
framework/behave/preset.yaml.
Automated review by LlamaPReview · Free for public open-source projects.
| - repo: https://github.com/MathiasPaulenko/behave-format | ||
| rev: v1.0.2 | ||
| hooks: | ||
| - id: behave-format |
There was a problem hiding this comment.
P2 | Confidence: High
The preset references three GitHub repositories owned by the PR author (MathiasPaulenko, author_association=NONE) using mutable Git tags rather than immutable commit hashes. If any of these repos is compromised or its tag force-pushed, every user running pc-init --framework behave then pre-commit run will execute arbitrary code from the attacker-controlled hook. Existing presets may also reference external repos, but this PR is the first to add repos owned by the contributor rather than the repository owner or a widely-recognized organization, crossing a trust boundary without compensating integrity verification. The adjudication policy for third-party mutable artifacts without known compromise evidence sets this as P2 hygiene rather than P1.
Conceptual guidance (not a committable GitHub suggestion):
Consider pinning to an immutable commit hash (e.g., `rev: abc123def456…`) for each repo, or hosting the hook definitions under the organization's control so that code changes require a reviewed PR to this repository.
Evidence: PR-head read of framework/behave/preset.yaml.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #41 +/- ##
========================================
Coverage 99.65% 99.65%
========================================
Files 19 19
Lines 2621 2621
========================================
Hits 2612 2612
Misses 9 9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@MathiasPaulenko just released 0.7.0 with your added hooks, also updated the awesome list |
Hi @cleder,
Following your suggestion in cleder/awesome-python-testing#103, I've added
.pre-commit-hooks.yamlfiles to the three Behave tools and would like to get them wired intopc-initso they can be picked up byawesome-pre-commit-hooks.This PR adds a
behaveframework preset with:behave-format(v1.0.2) — formats.featurefilesbehave-lint(v2.4.1) — lints Gherkin/.featurefilesbehave-doctor(v1.2.1) — runs static analysis on Behave BDD suitesAll three repos now ship their own
.pre-commit-hooks.yamland are tagged. The preset recommendspysince the tools are Python-specific, and I also updated the README to listbehaveamong the supported frameworks.Let me know if you want the descriptions, ordering, or anything else tweaked.
Cheers,
Mathias
Summary by Sourcery
Add a Behave BDD framework preset and document it among the supported frameworks.
New Features:
Documentation: