-
Notifications
You must be signed in to change notification settings - Fork 2
security checklist #33
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 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 |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| ## 🛡️ Security Checklist | ||
| *Review and check all that apply before requesting a review.* | ||
|
|
||
| - [ ] **Secrets:** I have verified that no API keys, passwords, or certificates are hardcoded. | ||
| - [ ] **Dependencies:** I have checked for known vulnerabilities in any new libraries added. | ||
| - [ ] **Data Handling:** Sensitive data (PII) is encrypted or masked in logs. | ||
| - [ ] **Input Validation:** All user-provided input is sanitized to prevent SQLi or XSS. | ||
| - [ ] **Permissions:** New endpoints or features follow the Principle of Least Privilege. | ||
|
|
||
| ## ⚙️ Backend & Performance | ||
| - [ ] **Database:** I have checked for N+1 query issues and verified index usage. | ||
| - [ ] **Migrations:** Database migrations are reversible (where applicable) and tested. | ||
| - [ ] **Error Handling:** Errors are caught and returned with appropriate HTTP status codes. | ||
| - [ ] **Scalability:** Large datasets are handled via pagination, not loaded entirely into memory. | ||
| - [ ] **Async:** Long-running tasks are moved to background workers (if applicable). | ||
|
|
||
| ## 🧪 Testing & Quality | ||
| - [ ] **Unit Tests:** Added/updated tests for the core logic. | ||
| - [ ] **Integration:** Verified that API contracts haven't broken for downstream services. | ||
| - [ ] **Observability:** Added logs or metrics to track the success/failure of this feature. | ||
| - [ ] **Documentation:** Updated Swagger/OpenAPI specs or internal READMEs. | ||
|
|
||
| ## ✍️ Sign-off | ||
| - [ ] I confirm that I have performed a self-review of this code from a security perspective. | ||
|
|
||
| **Reviewer Sign-off:** *(To be completed by the reviewer)* | ||
| - [ ] Security standards verified. |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,26 @@ | ||||||||||||||||||
| name: "Security Scan" | ||||||||||||||||||
|
|
||||||||||||||||||
| on: | ||||||||||||||||||
| pull_request: | ||||||||||||||||||
| branches: [ "master" ] | ||||||||||||||||||
|
|
||||||||||||||||||
| jobs: | ||||||||||||||||||
| analyze: | ||||||||||||||||||
| name: Analyze Code | ||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||
| permissions: | ||||||||||||||||||
| security-events: write | ||||||||||||||||||
| actions: read | ||||||||||||||||||
| contents: read | ||||||||||||||||||
|
|
||||||||||||||||||
| steps: | ||||||||||||||||||
| - name: Checkout repository | ||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||
|
|
||||||||||||||||||
| - name: Initialize CodeQL | ||||||||||||||||||
| uses: github/codeql-action/init@v3 | ||||||||||||||||||
| with: | ||||||||||||||||||
| languages: 'javascript' # Change to your language (python, go, etc.) | ||||||||||||||||||
|
Comment on lines
+20
to
+23
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. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check the primary languages used in the repo
fd -e js -e ts -e py -e go -e java -e rb -e cpp -e cs | head -30
echo "---"
# Check if package.json exists to confirm JS/TS project
fd -g 'package.json' --max-depth 2Repository: CloudStuffTech/tracker-utils Length of output: 596 🏁 Script executed: cat -n .github/workflows/security-scan.ymlRepository: CloudStuffTech/tracker-utils Length of output: 805 🏁 Script executed: cat package.jsonRepository: CloudStuffTech/tracker-utils Length of output: 987 Remove the misleading placeholder comment from the language setting. The repository is a pure JavaScript project ( The Suggested change - name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
- languages: 'javascript' # Change to your language (python, go, etc.)
+ languages: 'javascript'📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
|
|
||||||||||||||||||
| - name: Perform Analysis | ||||||||||||||||||
| uses: github/codeql-action/analyze@v3 | ||||||||||||||||||
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.
Add a
pushtrigger onmasterfor CodeQL baseline results.CodeQL needs to run on pushes to the default branch to populate the Security tab and establish a baseline for PR comparisons. Without this, PR scans may produce incomplete or noisy results.
Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents