-
Notifications
You must be signed in to change notification settings - Fork 1
(Changed) Documentation and configuration improvements #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
c0acd6d
4424b12
06713e0
6c3fa09
20613ba
bbf7e5c
63dac36
dbe7a58
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,31 +1,140 @@ | ||
| # Whitelist approach - ignore everything except specified files | ||
| # This approach provides better security by denying all files by default | ||
| # and explicitly allowing only essential development files | ||
|
|
||
| # ======================================== | ||
| # DENY ALL BY DEFAULT | ||
| # ======================================== | ||
| * | ||
|
|
||
| # ======================================== | ||
| # ALLOW DIRECTORY TRAVERSAL (CRITICAL) | ||
| # ======================================== | ||
| # Without this pattern, Git cannot traverse subdirectories | ||
| # to check for whitelisted files within them | ||
| !*/ | ||
|
|
||
| # ======================================== | ||
| # CORE APPLICATION FILES | ||
| # ======================================== | ||
| !*.php | ||
| !composer.json | ||
| !LICENSE | ||
|
|
||
| # ======================================== | ||
| # DOCUMENTATION | ||
| # ======================================== | ||
| !README.md | ||
| !CONTRIBUTING.md | ||
| !CHANGELOG.md | ||
|
|
||
| # ======================================== | ||
| # SOURCE CODE & TESTS | ||
| # ======================================== | ||
| !src/ | ||
| !src/** | ||
| !tests/ | ||
| !tests/** | ||
|
|
||
| # ======================================== | ||
| # CONFIGURATION FILES | ||
| # ======================================== | ||
| !phpunit.xml | ||
| !phpcs.xml | ||
| !phpstan.neon | ||
| !psalm.xml | ||
| !phpmd.xml | ||
| !pint.json | ||
| !rector.php | ||
| !infection.json5 | ||
|
|
||
| # ======================================== | ||
| # CI/CD & GITHUB | ||
| # ======================================== | ||
| !.github/ | ||
| !.github/** | ||
| !.pre-commit-config.yaml | ||
|
MarjovanLier marked this conversation as resolved.
|
||
| !.codacy.yaml | ||
|
|
||
| # ======================================== | ||
| # DOCKER & INFRASTRUCTURE | ||
| # ======================================== | ||
| !Dockerfile | ||
| !docker-compose.yml | ||
|
|
||
| # ======================================== | ||
| # DEVELOPMENT SCRIPTS | ||
| # ======================================== | ||
| !*.sh | ||
|
|
||
| # ======================================== | ||
| # NODE.JS CONFIGURATION (if present) | ||
| # ======================================== | ||
| !package.json | ||
| !commitlint.config.js | ||
|
|
||
| # ======================================== | ||
| # ADDITIONAL CONFIGURATIONS | ||
| # ======================================== | ||
| !.coderabbit.yaml | ||
| !.dockerignore | ||
| !.pr_agent.toml | ||
| !sweep.yaml | ||
|
|
||
| # ======================================== | ||
| # GIT CONFIGURATION | ||
| # ======================================== | ||
| !.gitignore | ||
| !.gitattributes | ||
| !.gitmessage | ||
|
|
||
| # ======================================== | ||
| # EXPLICITLY DENIED ITEMS | ||
| # (These remain ignored even with whitelist) | ||
| # ======================================== | ||
| # Dependencies and lock files | ||
| vendor/ | ||
| node_modules/ | ||
| composer.lock | ||
| vendor | ||
| tests/temp | ||
| .idea | ||
| package-lock.json | ||
|
|
||
| # Cache and temporary files | ||
| .phpunit.cache | ||
| .phpunit.result.cache | ||
| .php-cs-fixer.cache | ||
| reports | ||
|
|
||
| .qodo | ||
| *.tmp | ||
|
|
||
| # Qodana | ||
| # Build artifacts and reports | ||
| reports/ | ||
| .qodana/ | ||
| qodana.yaml | ||
| qodana.sarif.json | ||
| .qodana/ | ||
|
|
||
| # Temporary files | ||
| commit_messages.txt | ||
| *.tmp | ||
| # IDE and editor files | ||
| .idea/ | ||
| .vscode/ | ||
| *.swp | ||
| *.swo | ||
|
|
||
| # AI tooling directories (private) | ||
| .claude/ | ||
| .claude-flow/ | ||
| .hive-mind/ | ||
| .kilocode/ | ||
| .roo/ | ||
| .qodo/ | ||
|
|
||
| # Private documentation | ||
| CLAUDE.local.md | ||
| AGENTS.md | ||
|
|
||
| # Docker | ||
| # Docker overrides | ||
| .docker/ | ||
| docker-compose.override.yml | ||
|
|
||
| # Pre-commit | ||
| # Pre-commit cache | ||
| .pre-commit/ | ||
|
|
||
| # Node modules | ||
| node_modules/ | ||
| package-lock.json | ||
| .php-cs-fixer.cache | ||
| # System files | ||
| .DS_Store | ||
| Thumbs.db | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,3 +1,9 @@ | ||||||||||
| [config] | ||||||||||
| enable_auto_approval = true | ||||||||||
| enable_comment_approval = true | ||||||||||
| auto_approve_for_low_review_effort = 3 | ||||||||||
| auto_approve_for_no_suggestions = true | ||||||||||
|
|
||||||||||
|
Comment on lines
+1
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainDisable or tightly gate auto-approval; current settings can rubber-stamp risky PRs
Action: either disable auto-approval or gate it via branch protection, mandatory checks, and labels. Minimal, safe change: -[config]
-enable_auto_approval = true
-enable_comment_approval = true
-auto_approve_for_low_review_effort = 3
-auto_approve_for_no_suggestions = true
+[config]
+enable_auto_approval = false
+# Consider re-enabling only when restricted to docs-only PRs and CI green.
+enable_comment_approval = false
+# If you must keep auto-approval, remove low-effort auto-approve and rely on explicit human action.
+auto_approve_for_low_review_effort = 0
+auto_approve_for_no_suggestions = falseTo confirm safe guardrails, run this repository scan: 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== List workflows =="
fd -HI -t f -a .github/workflows | sort
echo "== Check for auto-merge or risky triggers =="
rg -n -C2 -iP '(auto[-_ ]?merge|enable-pull-request-automerge|gh\s+pr\s+merge\s+--auto|pull_request_target)' .github/workflows || true
echo "== Check for CODEOWNERS =="
if fd -HI -a CODEOWNERS .github; then
cat .github/CODEOWNERS
else
echo "No CODEOWNERS file found."
fi
echo "== Surface any workflow gating approvals =="
rg -n -C2 -iP '(required-approving-reviews|required_status_checks|required-reviewers)' .github || trueLength of output: 486 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== List all workflow files under .github/workflows =="
# Use fd to list every file in the workflows directory
fd -t f '' .github/workflows | sort
echo "== Search workflows for auto-merge or risky triggers =="
rg -n -C2 -iP '(auto[-_ ]?merge|enable-pull-request-automerge|gh\s+pr\s+merge\s+--auto|pull_request_target)' .github/workflows || true
echo "== Check for CODEOWNERS in .github directory =="
if fd -t f 'CODEOWNERS' .github | grep -q CODEOWNERS; then
cat .github/CODEOWNERS
else
echo "No CODEOWNERS file found under .github."
fi
echo "== Surface any workflow gating approvals across all workflows =="
rg -n -C2 -iP '(required-approving-reviews|required_status_checks|required-reviewers)' .github/workflows || trueLength of output: 1054 Disable or Gate Auto-Approval to Enforce Human Reviews The combination of
means PRs can be auto-approved with zero human eyes—contradicting our “four-eyes” principle and bypassing branch protections if not configured elsewhere. This is a critical governance gap. Recommendations:
Minimal patch suggestion: --- .pr_agent.toml
+[config]
enable_auto_approval = false # require explicit human sign-off
enable_comment_approval = false # disable comment-only auto-approval
auto_approve_for_low_review_effort = 0
auto_approve_for_no_suggestions = false
+# Note: you can re-enable these under “docs-only” guardrails via labels and CI.Please apply these changes before merging any high-privilege or code-impacting PRs.
🤖 Prompt for AI Agents |
||||||||||
| [pr_reviewer] | ||||||||||
| inline_code_comments = true | ||||||||||
| ask_and_reflect = true | ||||||||||
|
|
@@ -11,16 +17,16 @@ require_all_thresholds_for_incremental_review = false | |||||||||
| minimal_commits_for_incremental_review = 2 | ||||||||||
| minimal_minutes_for_incremental_review = 10 | ||||||||||
| enable_help_text = false | ||||||||||
| enable_auto_approval = false | ||||||||||
| require_approval = true | ||||||||||
| maximal_review_effort = 5 | ||||||||||
| maximal_review_effort = 4 | ||||||||||
|
|
||||||||||
| [pr_code_suggestions] | ||||||||||
| num_code_suggestions = 5 | ||||||||||
| summarize = true | ||||||||||
| auto_extended_mode = true | ||||||||||
| rank_suggestions = true | ||||||||||
| enable_help_text = false | ||||||||||
| demand_code_suggestions_self_review = true | ||||||||||
| approve_pr_on_self_review = true | ||||||||||
|
Comment on lines
+40
to
+41
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Self-review-triggered approvals violate four-eyes; disable bot approval on self-review
-demand_code_suggestions_self_review = true
-approve_pr_on_self_review = true
+demand_code_suggestions_self_review = true
+approve_pr_on_self_review = false📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
|
|
||||||||||
| [pr_update_changelog] | ||||||||||
| push_changelog_changes = false | ||||||||||
|
|
||||||||||
Uh oh!
There was an error while loading. Please reload this page.