Repository navigation
chore: automated code quality fixes (npx) #3
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
base: main
Are you sure you want to change the base?
Changes from all commits
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,32 +1,38 @@ | ||
| --- | ||
| name: "🐛 Bug Report" | ||
| name: '🐛 Bug Report' | ||
| about: Report something that is broken in Debugra | ||
| title: "[BUG] <Short description of the bug>" | ||
| labels: ["bug", "triage"] | ||
| assignees: "" | ||
| title: '[BUG] <Short description of the bug>' | ||
| labels: ['bug', 'triage'] | ||
| assignees: '' | ||
| --- | ||
|
|
||
| ### ✦ Describe the Bug | ||
|
|
||
| A clear and concise description of what the bug is. | ||
|
|
||
| ### ⟡ Steps to Reproduce | ||
|
|
||
| Steps to reproduce the behavior: | ||
|
|
||
| 1. Go to '...' | ||
| 2. Click on '....' | ||
| 3. Scroll down to '....' | ||
| 4. See error | ||
|
|
||
| ### ✦ Expected Behavior | ||
|
|
||
| A clear and concise description of what you expected to happen. | ||
|
|
||
| ### ⟡ Screenshots (If applicable) | ||
|
|
||
| Add screenshots to help explain your problem. | ||
|
|
||
| ### 💻 Environment Details | ||
|
|
||
| - OS: [e.g. Windows 11, macOS, Ubuntu] | ||
| - Browser: [e.g. Chrome, Firefox, Safari] | ||
| - Version: [e.g. 122.0.0] | ||
|
|
||
| ### ✦ Additional Context | ||
| Add any other context or terminal/console logs about the problem here. | ||
|
|
||
| Add any other context or terminal/console logs about the problem here. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,27 @@ | ||
| --- | ||
| name: "🚀 Feature Request" | ||
| name: '🚀 Feature Request' | ||
| about: Suggest a new feature or improvement for Debugra | ||
| title: "[FEAT] <Short description of the proposed feature>" | ||
| labels: ["enhancement", "triage"] | ||
| assignees: "" | ||
| title: '[FEAT] <Short description of the proposed feature>' | ||
| labels: ['enhancement', 'triage'] | ||
| assignees: '' | ||
| --- | ||
|
|
||
| ### ✦ Is your feature request related to a problem? | ||
|
|
||
| A clear and concise description of what the problem is. (e.g., "I'm frustrated when...") | ||
|
|
||
| ### ⟡ Describe the Proposed Solution | ||
|
|
||
| A clear and concise description of what you want to happen. Describe any UI design elements, components, or helper hooks that would need changes. | ||
|
|
||
| ### ✦ Describe Alternatives Considered | ||
|
|
||
| A clear and concise description of any alternative solutions or features you've considered. | ||
|
|
||
| ### 🎨 Visual Mockup/Sketches (Optional) | ||
|
|
||
| If you have any sketches, UI ideas, or screenshots of similar features, paste them here. | ||
|
|
||
| ### ⟡ Additional Context | ||
|
|
||
| Add any other context or references about the feature request here. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ on: | |
| jobs: | ||
| backup: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,30 +1,30 @@ | ||||||||||
| name: Playwright Tests | ||||||||||
| on: | ||||||||||
| push: | ||||||||||
| branches: [ main, master ] | ||||||||||
| branches: [main, master] | ||||||||||
| pull_request: | ||||||||||
| branches: [ main, master ] | ||||||||||
| branches: [main, master] | ||||||||||
| jobs: | ||||||||||
| test: | ||||||||||
| timeout-minutes: 60 | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
| steps: | ||||||||||
| - uses: actions/checkout@v4 | ||||||||||
| - uses: actions/setup-node@v4 | ||||||||||
| with: | ||||||||||
| node-version: 20 | ||||||||||
| cache: npm | ||||||||||
| - name: Install dependencies | ||||||||||
| run: npm install | ||||||||||
| - name: Install backend dependencies | ||||||||||
| run: npm install --prefix server | ||||||||||
| - name: Install Playwright Browsers | ||||||||||
| run: npx playwright install --with-deps | ||||||||||
| - name: Run Playwright tests | ||||||||||
| run: npx playwright test | ||||||||||
| - uses: actions/upload-artifact@v4 | ||||||||||
| if: always() | ||||||||||
| with: | ||||||||||
| name: playwright-report | ||||||||||
| path: playwright-report/ | ||||||||||
| retention-days: 30 | ||||||||||
| - uses: actions/checkout@v4 | ||||||||||
|
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. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== workflow files =="
git ls-files .github/workflows || true
echo "== playwright workflow =="
if [ -f .github/workflows/playwright.yml ]; then
nl -ba .github/workflows/playwright.yml | sed -n '1,220p'
fi
echo "== search persist-credentials and checkout usages =="
rg -n "actions/checkout|persist-credentials|pull_request|merge_group|permissions:" .github/workflows || true
echo "== diff stat/name =="
git diff --stat HEAD~1..HEAD || true
git diff -- .github/workflows/playwright.yml | sed -n '1,160p' || trueRepository: saurabhhhcodes/Debugra Length of output: 794 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== playwright workflow with line numbers =="
awk '{printf "%5d %s\n", NR, $0}' .github/workflows/playwright.yml | sed -n '1,220p'
echo "== triggers/usages in playwright workflow =="
grep -nE 'pull_request|pull_request_target|merge_group|workflow_dispatch|push|permissions:|actions/checkout|persist-credentials|npm (install|ci)|test|playwright|node' .github/workflows/playwright.yml || true
echo "== checkout persist-credentials in workflows =="
grep -nE 'actions/checkout|persist-credentials' .github/workflows || true
echo "== permissions across workflows =="
python3 - <<'PY'
from pathlib import Path
for p in sorted(Path(".github/workflows").glob("*.yml")):
text=p.read_text()
if "permissions:" in text or "pull_request:" in text or "pull_request_target:" in text or "merge_group:" in text:
print(f"\n-- {p} --")
lines=text.splitlines()
for i,l in enumerate(lines,1):
if any(s in l for s in ["permissions:", "pull_request:", "pull_request_target:", "merge_group:", "workflow_dispatch:", "push:", "pull_request_review:"]):
start=max(1,i-2); end=min(len(lines), i+3)
for j in range(start,end+1):
print(f"{j:04d} {lines[j-1]}")
PYRepository: saurabhhhcodes/Debugra Length of output: 6094 🌐 Web query:
💡 Result: In the actions/checkout action, including version v4, the persist-credentials input has a default value of true [1][2]. When persist-credentials is set to true (the default), the action configures the Git token or SSH key in the local git configuration [1][3]. This allows your workflow scripts to run authenticated Git commands (such as git push or git fetch) without needing to manually handle credentials [4][3]. The action automatically cleans up these credentials during the post-job phase [4][3]. If you wish to prevent this behavior, you can explicitly set persist-credentials: false in your workflow step [4]. While the default remains true, note that in newer versions of the action (such as v6 and later), the implementation of this feature was improved to store credentials in a temporary location ($RUNNER_TEMP) rather than directly in the.git/config file, enhancing security [3][5]. Citations:
Disable persisted checkout credentials before running PR code.
Suggested fix - uses: actions/checkout@v4
+ with:
+ persist-credentials: false📝 Committable suggestion
Suggested change
🧰 Tools🪛 zizmor (1.26.1)[warning] 12-12: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||||||||||
| - uses: actions/setup-node@v4 | ||||||||||
| with: | ||||||||||
| node-version: 20 | ||||||||||
| cache: npm | ||||||||||
| - name: Install dependencies | ||||||||||
| run: npm install | ||||||||||
| - name: Install backend dependencies | ||||||||||
| run: npm install --prefix server | ||||||||||
| - name: Install Playwright Browsers | ||||||||||
| run: npx playwright install --with-deps | ||||||||||
| - name: Run Playwright tests | ||||||||||
| run: npx playwright test | ||||||||||
| - uses: actions/upload-artifact@v4 | ||||||||||
| if: always() | ||||||||||
| with: | ||||||||||
| name: playwright-report | ||||||||||
| path: playwright-report/ | ||||||||||
| retention-days: 30 | ||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Fix the initial heading level in both templates. Both files start their Markdown body at
###, triggering MD001..github/ISSUE_TEMPLATE/bug_report.md#L9-L9: change### ✦ Describe the Bugto## ✦ Describe the Bug..github/ISSUE_TEMPLATE/feature_request.md#L9-L9: change### ✦ Is your feature request related to a problem?to## ✦ Is your feature request related to a problem?.🧰 Tools
🪛 markdownlint-cli2 (0.23.0)
[warning] 9-9: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3
(MD001, heading-increment)
📍 Affects 2 files
.github/ISSUE_TEMPLATE/bug_report.md#L9-L9(this comment).github/ISSUE_TEMPLATE/feature_request.md#L9-L9🤖 Prompt for AI Agents
Source: Linters/SAST tools