feat: CI workflow for lint, test, and smoke checks (Closes #29) - #115
feat: CI workflow for lint, test, and smoke checks (Closes #29)#115laurentketterle-hub wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughAdded a GitHub Actions workflow for pushes and pull requests targeting ChangesContinuous Integration Workflow
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Line 15: Update the pull_request job in the workflow to configure
actions/checkout with persist-credentials disabled and add job-level contents:
read permissions, ensuring repository-controlled npm commands cannot access
persisted GitHub credentials.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 60d0e016-5d9c-4bae-96da-5f67130b0ae7
📒 Files selected for processing (1)
.github/workflows/ci.yml
| timeout-minutes: 15 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -e
printf '%s\n' '--- workflow ---'
cat -n .github/workflows/ci.yml
printf '%s\n' '--- workflow files ---'
git ls-files '.github/workflows/*'
printf '%s\n' '--- checkout and permission settings ---'
rg -n -C 3 'actions/checkout|permissions:|pull_request|npm ci|npm run|setup-node' .github/workflows
printf '%s\n' '--- package scripts and lifecycle hooks ---'
python3 - <<'PY'
import json
from pathlib import Path
p = Path("package.json")
if p.exists():
data = json.loads(p.read_text())
scripts = data.get("scripts", {})
for name, value in scripts.items():
print(f"{name}: {value}")
for name in ("preinstall", "install", "postinstall", "prepare"):
if name in scripts:
print(f"lifecycle {name}: {scripts[name]}")
else:
print("package.json: absent")
PYRepository: Flamki/stellarmind
Length of output: 9504
🏁 Script executed:
#!/bin/bash
set -e
python3 - <<'PY'
from pathlib import Path
text = Path(".github/workflows/ci.yml").read_text()
checkout = next((line for line in text.splitlines() if "actions/checkout@" in line), None)
print("checkout:", checkout)
print("persist-credentials explicitly set:", "persist-credentials:" in text)
print("top-level permissions block:", any(line.startswith("permissions:") for line in text.splitlines()))
print("job-level permissions blocks:", any(line.startswith(" permissions:") for line in text.splitlines()))
print("pull_request trigger:", "pull_request:" in text or "pull_request" in text)
print("npm ci present:", "npm ci" in text)
print("npm run present:", "npm run" in text)
PYRepository: Flamki/stellarmind
Length of output: 383
🏁 Script executed:
cat -n .github/workflows/ci.ymlRepository: Flamki/stellarmind
Length of output: 1226
Disable persisted GitHub credentials before running pull request code.
The pull_request job runs npm ci and multiple npm run commands, which execute repository-controlled code. Set persist-credentials: false and restrict the job to contents: read.
🧰 Tools
🪛 zizmor (1.29.0)
[warning] 15-15: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/ci.yml at line 15, Update the pull_request job in the
workflow to configure actions/checkout with persist-credentials disabled and add
job-level contents: read permissions, ensuring repository-controlled npm
commands cannot access persisted GitHub credentials.
Source: Linters/SAST tools
Closes #29
Adds a comprehensive CI workflow that runs on every PR and push to master:
Checks performed
Design
Signed-off-by: laurentketterle-hub laurentketterle-hub@users.noreply.github.com
Summary by CodeRabbit