-
Notifications
You must be signed in to change notification settings - Fork 2
fix(ci): workflow permissions cleanup #329
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 |
|---|---|---|
|
|
@@ -5,7 +5,8 @@ on: | |
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
Comment on lines
+8
to
+9
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. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '\n## ci-cd.yml\n'
nl -ba .github/workflows/ci-cd.yml | sed -n '1,220p'
printf '\n## security-comprehensive.yml\n'
nl -ba .github/workflows/security-comprehensive.yml | sed -n '1,260p'
printf '\n## SARIF upload references\n'
rg -n "upload-sarif|codeql-action/upload-sarif|security-events: write|permissions:" .github/workflows -SRepository: welshDog/HyperCode-V2.4 Length of output: 215 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '\n## ci-cd.yml\n'
sed -n '1,240p' .github/workflows/ci-cd.yml | cat -n
printf '\n## security-comprehensive.yml\n'
sed -n '1,320p' .github/workflows/security-comprehensive.yml | cat -n
printf '\n## SARIF upload references\n'
rg -n "upload-sarif|codeql-action/upload-sarif|security-events: write|permissions:" .github/workflows -SRepository: welshDog/HyperCode-V2.4 Length of output: 16438 Add 📍 Affects 2 files
🤖 Prompt for AI Agents |
||
| concurrency: | ||
| group: ci-cd-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,10 @@ name: JS CI | |
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
Comment on lines
+5
to
+8
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. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: printf 'ci-js.yml:\n'; sed -n '1,120p' .github/workflows/ci-js.yml; printf '\nquality-gate.yml:\n'; sed -n '1,200p' .github/workflows/quality-gate.ymlRepository: welshDog/HyperCode-V2.4 Length of output: 9678 Move 🤖 Prompt for AI Agents |
||
| inputs: | ||
| node_version: | ||
| description: Node version | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| name: CI — Python | ||
| permissions: | ||
| contents: readname: CI — Python | ||
|
Comment on lines
+1
to
+2
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. 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: sed -n '1,40p' .github/workflows/ci-python.yml | cat -nRepository: welshDog/HyperCode-V2.4 Length of output: 1185 🏁 Script executed: ruby - <<'RUBY'
require 'yaml'
path = '.github/workflows/ci-python.yml'
text = File.read(path)
begin
data = YAML.safe_load(text, aliases: true)
puts "Parsed as: #{data.class}"
p data
rescue => e
warn "#{e.class}: #{e.message}"
end
RUBYRepository: welshDog/HyperCode-V2.4 Length of output: 261 Repair the workflow header
🤖 Prompt for AI Agents |
||
|
|
||
| on: | ||
| push: | ||
|
|
@@ -13,6 +14,9 @@ on: | |
| - 'backend/**' | ||
| - 'requirements*.txt' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ci-python-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| name: \uD83D\uDD12 Security Scan | ||
|
|
||
| permissions read | ||
| on: | ||
| read | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| name: Docker Build & Test | ||
|
|
||
| permissions: | ||
| contents: read | ||
| on: | ||
| read | ||
| on: | ||
| push: | ||
| branches: [ main, develop ] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| name: Docker Push to Registry | ||
|
|
||
| permissions: | ||
| contents: read | ||
| on: | ||
| read | ||
| on: | ||
| push: | ||
| branches: [ main ] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| name: Docker Build & Verify | ||
|
|
||
| permissions: | ||
| contents: read | ||
| on: | ||
| read | ||
|
Comment on lines
+3
to
+6
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. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
files=(
.github/workflows/docker.yml
.github/workflows/docs-check.yml
.github/workflows/docs-lint.yml
.github/workflows/evo-harness.yml
.github/workflows/health-check.yml
.github/workflows/trivy-scan.yml
.github/workflows/trivy-weekly.yml
)
for f in "${files[@]}"; do
echo "===== $f ====="
nl -ba "$f" | sed -n '1,40p'
echo
doneRepository: welshDog/HyperCode-V2.4 Length of output: 243 🏁 Script executed: #!/bin/bash
set -euo pipefail
python3 - <<'PY'
from pathlib import Path
files = [
Path('.github/workflows/docker.yml'),
Path('.github/workflows/docs-check.yml'),
Path('.github/workflows/docs-lint.yml'),
Path('.github/workflows/evo-harness.yml'),
Path('.github/workflows/health-check.yml'),
Path('.github/workflows/trivy-scan.yml'),
Path('.github/workflows/trivy-weekly.yml'),
]
for p in files:
print(f"===== {p} =====")
text = p.read_text()
for i, line in enumerate(text.splitlines(), 1):
if i <= 30:
print(f"{i:>4}: {line}")
print()
PYRepository: welshDog/HyperCode-V2.4 Length of output: 5771 🏁 Script executed: #!/bin/bash
set -euo pipefail
python3 - <<'PY'
import re
from pathlib import Path
files = [
Path('.github/workflows/docker.yml'),
Path('.github/workflows/docs-check.yml'),
Path('.github/workflows/docs-lint.yml'),
Path('.github/workflows/evo-harness.yml'),
Path('.github/workflows/health-check.yml'),
Path('.github/workflows/trivy-scan.yml'),
Path('.github/workflows/trivy-weekly.yml'),
]
for p in files:
txt = p.read_text()
m = re.search(r'^\s*on:\s*read\s*$', txt, flags=re.M)
print(f"{p}: {'HAS on: read' if m else 'NO on: read'}")
PYRepository: welshDog/HyperCode-V2.4 Length of output: 490 🏁 Script executed: #!/bin/bash
set -euo pipefail
python3 - <<'PY'
from pathlib import Path
files = [
Path('.github/workflows/docker.yml'),
Path('.github/workflows/docs-check.yml'),
Path('.github/workflows/docs-lint.yml'),
Path('.github/workflows/evo-harness.yml'),
Path('.github/workflows/health-check.yml'),
Path('.github/workflows/trivy-scan.yml'),
Path('.github/workflows/trivy-weekly.yml'),
]
for p in files:
print(f"===== {p} =====")
for i, line in enumerate(p.read_text().splitlines(), 1):
if i <= 20:
print(f"{i:>4}: {line}")
print()
PYRepository: welshDog/HyperCode-V2.4 Length of output: 3618 🏁 Script executed: #!/bin/bash
set -euo pipefail
python3 - <<'PY'
import re
from pathlib import Path
files = [
Path('.github/workflows/docker.yml'),
Path('.github/workflows/docs-check.yml'),
Path('.github/workflows/docs-lint.yml'),
Path('.github/workflows/evo-harness.yml'),
Path('.github/workflows/health-check.yml'),
Path('.github/workflows/trivy-scan.yml'),
Path('.github/workflows/trivy-weekly.yml'),
]
for p in files:
txt = p.read_text()
has = bool(re.search(r'^\s*on:\s*read\s*$', txt, flags=re.M))
print(f"{p}: {'HAS on: read' if has else 'NO on: read'}")
PYRepository: welshDog/HyperCode-V2.4 Length of output: 490 Remove the stray
📍 Affects 7 files
🤖 Prompt for AI Agents |
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| name: Docs Check | ||
|
|
||
| permissions: | ||
| contents: read | ||
| on: | ||
| read | ||
| on: | ||
| pull_request: | ||
| paths: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| name: Docs Lint | ||
|
|
||
| permissions: | ||
| contents: read | ||
| on: | ||
| read | ||
| on: | ||
| pull_request: | ||
| paths: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| name: 💚 HyperCode Health Check | ||
|
|
||
| permissions: | ||
| contents: read | ||
| on: | ||
| read | ||
| on: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| name: Health Checks | ||
|
|
||
| permissions: | ||
| contents: read | ||
| on: | ||
| read | ||
|
Comment on lines
+5
to
+6
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. 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win Remove invalid The
📍 Affects 5 files
🤖 Prompt for AI Agents |
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| name: Hyper Agents CI | ||
|
|
||
| permissions: | ||
| contents: read | ||
| on: | ||
| read | ||
| on: | ||
| push: | ||
| branches: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| name: Hyper Agents Gate 2 — E2E & Full Stack | ||
|
|
||
| permissions: | ||
| contents: read | ||
| on: | ||
| read | ||
| on: | ||
| pull_request: | ||
| branches: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| name: IaC & Dockerfile Scan | ||
|
|
||
| permissions: | ||
| contents: read | ||
| on: | ||
| read | ||
| on: | ||
| push: | ||
| branches: [main, master] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,9 @@ | ||
| name: Lean Duplicate Review | ||
|
|
||
| permissions: | ||
| contents: read | ||
| on: | ||
| read | ||
| on: | ||
| push: | ||
| paths: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,9 @@ | ||
| name: No Legacy Paths Guard | ||
|
|
||
| permissions: | ||
| contents: read | ||
| on: | ||
| read | ||
|
Comment on lines
+5
to
+6
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. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
for f in \
.github/workflows/no-legacy-paths.yml \
.github/workflows/performance.yml \
.github/workflows/playwright-dashboard.yml \
.github/workflows/promote-dashboards.yml \
.github/workflows/prune_audit.yml \
.github/workflows/quality-gate.yml
do
echo "===== $f ====="
nl -ba "$f" | sed -n '1,40p'
echo
doneRepository: welshDog/HyperCode-V2.4 Length of output: 252 🏁 Script executed: #!/bin/bash
set -euo pipefail
python3 - <<'PY'
from pathlib import Path
files = [
".github/workflows/no-legacy-paths.yml",
".github/workflows/performance.yml",
".github/workflows/playwright-dashboard.yml",
".github/workflows/promote-dashboards.yml",
".github/workflows/prune_audit.yml",
".github/workflows/quality-gate.yml",
]
for file in files:
print(f"===== {file} =====")
text = Path(file).read_text()
for i, line in enumerate(text.splitlines(), 1):
if 1 <= i <= 30:
print(f"{i:4d}: {line}")
print()
PYRepository: welshDog/HyperCode-V2.4 Length of output: 5357 🏁 Script executed: #!/bin/bash
set -euo pipefail
nl -ba .github/workflows/no-legacy-paths.yml | sed -n '1,20p'Repository: welshDog/HyperCode-V2.4 Length of output: 201 🏁 Script executed: python3 - <<'PY'
from pathlib import Path
import sys
try:
import yaml
except Exception as e:
print(f"PyYAML unavailable: {e}")
sys.exit(0)
files = [
".github/workflows/no-legacy-paths.yml",
".github/workflows/performance.yml",
".github/workflows/playwright-dashboard.yml",
".github/workflows/promote-dashboards.yml",
".github/workflows/prune_audit.yml",
".github/workflows/quality-gate.yml",
]
for file in files:
text = Path(file).read_text()
print(f"===== {file} =====")
try:
data = yaml.safe_load(text)
top = list(data.keys()) if isinstance(data, dict) else type(data).__name__
print("loaded:", top)
print("on:", data.get("on") if isinstance(data, dict) else None)
print("permissions:", data.get("permissions") if isinstance(data, dict) else None)
except Exception as e:
print("parse error:", type(e).__name__, e)
PYRepository: welshDog/HyperCode-V2.4 Length of output: 1072 🏁 Script executed: python3 - <<'PY'
from pathlib import Path
import yaml
files = [
".github/workflows/no-legacy-paths.yml",
".github/workflows/performance.yml",
".github/workflows/playwright-dashboard.yml",
".github/workflows/promote-dashboards.yml",
".github/workflows/prune_audit.yml",
".github/workflows/quality-gate.yml",
]
def dump(node, indent=0):
pad = " " * indent
if isinstance(node, yaml.ScalarNode):
print(f"{pad}Scalar(tag={node.tag!r}, value={node.value!r})")
elif isinstance(node, yaml.SequenceNode):
print(f"{pad}Sequence(tag={node.tag!r})")
for item in node.value:
dump(item, indent + 1)
elif isinstance(node, yaml.MappingNode):
print(f"{pad}Mapping(tag={node.tag!r})")
for k, v in node.value:
print(f"{pad} Key:")
dump(k, indent + 2)
print(f"{pad} Value:")
dump(v, indent + 2)
else:
print(f"{pad}{type(node).__name__}")
for file in files:
print(f"===== {file} =====")
root = yaml.compose(Path(file).read_text())
dump(root)
print()
PYRepository: welshDog/HyperCode-V2.4 Length of output: 48294 Remove the stray
📍 Affects 6 files
🤖 Prompt for AI Agents |
||
| on: | ||
| push: | ||
| branches: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,10 @@ | ||
|
|
||
| name: Performance Testing | ||
|
|
||
| permissions: | ||
| contents: read | ||
| on: | ||
| read | ||
| on: | ||
| workflow_dispatch: | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| name: Playwright Dashboard E2E | ||
|
|
||
| permissions: | ||
| contents: read | ||
| on: | ||
| read | ||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| name: Promote dashboards to Grafana Cloud | ||
|
|
||
| permissions: | ||
| contents: read | ||
| on: | ||
| read | ||
| on: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| name: Prune Celery Task Audit | ||
|
|
||
| permissions: | ||
| contents: read | ||
| on: | ||
| read | ||
| on: | ||
| schedule: | ||
| - cron: '0 3 * * *' | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,11 @@ | ||
| name: Security — Comprehensive Scan | ||
|
|
||
| permissions: | ||
| contents: read | ||
| on: | ||
| read | ||
| on: | ||
| read | ||
|
Comment on lines
+5
to
+8
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. 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '\n## security-comprehensive.yml\n'
cat -n .github/workflows/security-comprehensive.yml | sed -n '1,120p'
printf '\n## secret-redaction-guard.yml\n'
cat -n .github/workflows/secret-redaction-guard.yml | sed -n '1,120p'
printf '\n## sse-tests.yml\n'
cat -n .github/workflows/sse-tests.yml | sed -n '1,120p'
printf '\n## ci-cd.yml\n'
cat -n .github/workflows/ci-cd.yml | sed -n '1,160p'Repository: welshDog/HyperCode-V2.4 Length of output: 11684 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '\n## security-comprehensive.yml outline\n'
ast-grep outline .github/workflows/security-comprehensive.yml || true
printf '\n## secret-redaction-guard.yml outline\n'
ast-grep outline .github/workflows/secret-redaction-guard.yml || true
printf '\n## sse-tests.yml outline\n'
ast-grep outline .github/workflows/sse-tests.yml || true
printf '\n## ci-cd.yml outline\n'
ast-grep outline .github/workflows/ci-cd.yml || trueRepository: welshDog/HyperCode-V2.4 Length of output: 493 🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n "on:\s*read|security-events:\s*write|sarif|permissions:" .github/workflows/security-comprehensive.yml .github/workflows/secret-redaction-guard.yml .github/workflows/sse-tests.yml .github/workflows/ci-cd.ymlRepository: welshDog/HyperCode-V2.4 Length of output: 2041 🏁 Script executed: #!/bin/bash
set -euo pipefail
python3 - <<'PY'
from pathlib import Path
import sys
try:
import yaml
except Exception as e:
print(f"PyYAML unavailable: {e}")
sys.exit(0)
files = [
".github/workflows/security-comprehensive.yml",
".github/workflows/secret-redaction-guard.yml",
".github/workflows/sse-tests.yml",
]
for path in files:
text = Path(path).read_text()
print(f"\n## {path}")
try:
data = yaml.safe_load(text)
print("top-level keys:", list(data.keys()) if isinstance(data, dict) else type(data))
on_value = data.get("on") if isinstance(data, dict) else None
print("parsed on:", on_value)
except Exception as e:
print("parse error:", type(e).__name__, e)
PYRepository: welshDog/HyperCode-V2.4 Length of output: 527 Remove the stray
📍 Affects 3 files
🤖 Prompt for AI Agents |
||
| on: | ||
| push: | ||
| branches: [main] # ← main only, never feature branches | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| name: Fast SSE Tests | ||
|
|
||
| permissions: | ||
| contents: read | ||
| on: | ||
| read | ||
| on: | ||
| push: | ||
| paths: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| name: Swarm Pipeline | ||
|
|
||
| permissions: | ||
| contents: read | ||
| on: | ||
| read | ||
| on: | ||
| workflow_dispatch: | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| name: Tests & Quality | ||
|
|
||
| permissions: | ||
| contents: read | ||
| on: | ||
| read | ||
| on: | ||
| workflow_call: | ||
| schedule: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| name: Trivy Security Scan | ||
|
|
||
| permissions: | ||
| contents: read | ||
| on: | ||
| read | ||
| on: | ||
| push: | ||
| branches: [main] # ← main only | ||
|
|
||
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.
🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win
Remove GitHub Actions syntax from the Dependabot configuration.
The
.github/dependabot.ymlfile uses a distinct schema and does not support GitHub Actions workflow keys such aspermissions,on,concurrency, andjobs. Adding these will cause Dependabot to fail schema validation, preventing it from functioning. Furthermore, this block contains an invalidon: readtrigger and duplicateonkeys.Please remove this entire block from the configuration.
🐛 Proposed fix to remove invalid configuration
📝 Committable suggestion
🤖 Prompt for AI Agents