Repository navigation
ci: use the shared codestyle workflow #36
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 |
|---|---|---|
| @@ -1,15 +1,10 @@ | ||
| name: Codestyle Checks | ||
| on: | ||
| push: | ||
| branches: | ||
| - 'master' | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| check-codestyle: | ||
| strategy: | ||
| fail-fast: false | ||
| runs-on: ubuntu-latest | ||
| name: Check Codestyling | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Check Codestyling | ||
| run: source ./apps/ci/ci-codestyle.sh | ||
| codestyle: | ||
| uses: azerothcore/reusable-workflows/.github/workflows/codestyle_modules.yml@main | ||
|
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 | 🛡️ Analyzed with Security Review | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: sed -n '1,100p' .github/workflows/core_codestyle.yml
sed -n '1,100p' .github/workflows/core-build.yml
rg -n 'reusable-workflows/.+@|permissions:|default.*permissions' .github README.md CONTRIBUTING.md . 2>/dev/null | head -250Repository: azerothcore/skeleton-module Length of output: 994 🏁 Script executed: #!/bin/bash
set -eu
python3 - <<'PY'
from urllib.request import Request, urlopen
urls = [
"https://raw.githubusercontent.com/azerothcore/reusable-workflows/main/.github/workflows/codestyle_modules.yml",
"https://api.github.com/repos/azerothcore/reusable-workflows/contents/.github/workflows/codestyle_modules.yml?ref=main",
]
for url in urls:
print(f"--- {url} ---")
try:
req = Request(url, headers={"User-Agent": "CodeRabbit-static-inspection"})
with urlopen(req, timeout=10) as response:
data = response.read().decode("utf-8", "replace")
if "api.github.com" in url:
import json
obj = json.loads(data)
import base64
data = base64.b64decode(obj["content"]).decode("utf-8", "replace")
print(data[:20000])
except Exception as exc:
print(f"FETCH_ERROR: {exc}")
PYRepository: azerothcore/skeleton-module Length of output: 771 🏁 Script executed: #!/bin/bash
set -eu
for url in \
'https://raw.githubusercontent.com/azerothcore/reusable-workflows/main/.github/workflows/codestyle_modules.yml' \
'https://api.github.com/repos/azerothcore/reusable-workflows/contents/.github/workflows/codestyle_modules.yml?ref=main'
do
echo "--- $url ---"
if [[ "$url" == https://api.github.com/* ]]; then
curl -kfsSL --max-time 15 -A 'CodeRabbit-static-inspection' "$url" |
python3 -c 'import sys,json,base64; print(base64.b64decode(json.load(sys.stdin)["content"]).decode("utf-8","replace"))'
else
curl -kfsSL --max-time 15 -A 'CodeRabbit-static-inspection' "$url"
fi
doneRepository: azerothcore/skeleton-module Length of output: 1734 Security Misconfiguration Reachability: Internal Pin the reusable workflow to a full commit SHA.
🧰 Tools🪛 zizmor (1.30.0)[warning] 9-11: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block (excessive-permissions) 🤖 Prompt for AI Agents |
||
This file was deleted.
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.
🔒 Security & Privacy | 🛡️ Analyzed with Security Review | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: azerothcore/skeleton-module
Length of output: 551
🏁 Script executed:
Repository: azerothcore/skeleton-module
Length of output: 1052
Security Misconfiguration
Reachability: External
CWE: CWE-732 — Incorrect Permission Assignment for Critical Resource
Declare read-only token permissions for the codestyle job.
codestyle_modules.ymlonly checks out repository contents and runs the codestyle script. Setcontents: readso repository defaults cannot grant the called workflow broaderGITHUB_TOKENaccess.Suggested fix
📝 Committable suggestion
🧰 Tools
🪛 zizmor (1.30.0)
[warning] 9-11: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
🤖 Prompt for AI Agents
Source: Linters/SAST tools