Repository navigation
chore(governance): 放行 harden-runner/scorecard-action + scorecard 周扫 #15
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,32 @@ | ||
| name: scorecard | ||
| on: | ||
| branch_protection_rule: | ||
| schedule: | ||
| - cron: "0 5 * * 1" | ||
| push: | ||
| branches: [main] | ||
|
|
||
| permissions: read-all | ||
|
|
||
| jobs: | ||
| analysis: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| security-events: write | ||
| id-token: write | ||
| contents: read | ||
| actions: read | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Scorecard analysis | ||
| uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4 | ||
|
Comment on lines
+20
to
+24
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 -eu
printf '%s\n' '--- workflow ---'
cat -n .github/workflows/scorecard.yml
printf '%s\n' '--- harden-runner references ---'
rg -n -C 3 'step-security/harden-runner|harden-runner' .github || true
printf '%s\n' '--- workflow action references ---'
rg -n '^[[:space:]]*-?[[:space:]]*uses:' .github/workflows || true
printf '%s\n' '--- repository policy references ---'
rg -n -i -C 2 'harden-runner|step-security|approved|allowlist|白名单|出网|egress' .github README.md CONTRIBUTING.md SECURITY.md 2>/dev/null || trueRepository: Cloudbird-Software/.github Length of output: 2101 添加 当前工作流没有运行时出网监控。将 🤖 Prompt for AI AgentsSource: Path instructions |
||
| with: | ||
| results_file: results.sarif | ||
| results_format: sarif | ||
| publish_results: true | ||
| - name: Upload SARIF | ||
| uses: github/codeql-action/upload-sarif@c16c0f3f2812ec4bb3750a5ed64873fe2ce0fbef # codeql-bundle-v2.26.3 | ||
| with: | ||
| sarif_file: results.sarif | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,9 @@ | |
| "dependabot/fetch-metadata", | ||
| "softprops/action-gh-release", | ||
| "docker/*", | ||
| "Cloudbird-Software/*" | ||
| "Cloudbird-Software/*", | ||
|
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 将 Line 14 会将该 owner 下的所有现有和未来 Action 加入组织允许列表。 🤖 Prompt for AI Agents |
||
| "step-security/harden-runner", | ||
| "ossf/scorecard-action" | ||
| ], | ||
| "default_workflow_permissions": "read", | ||
| "default_workflow_permissions_can_approve": false | ||
|
|
@@ -23,9 +25,14 @@ | |
| "repo_baseline": { | ||
| "squash_only": true, | ||
| "delete_branch_on_merge": true, | ||
| "exclude_repos": ["AI_Web_School"] | ||
| "exclude_repos": [ | ||
| "AI_Web_School" | ||
| ] | ||
| }, | ||
| "org_secrets_required": ["CB_APP_ID", "AGENT_APP_SECRET"], | ||
| "org_secrets_required": [ | ||
| "CB_APP_ID", | ||
| "AGENT_APP_SECRET" | ||
| ], | ||
| "github_app": { | ||
| "name": "cloudbrid-agent", | ||
| "id": 4632704, | ||
|
|
@@ -35,6 +42,9 @@ | |
| "metadata": "read", | ||
| "pull_requests": "write" | ||
| }, | ||
| "must_not_have": ["workflows", "administration"] | ||
| "must_not_have": [ | ||
| "workflows", | ||
| "administration" | ||
| ] | ||
| } | ||
| } | ||
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 | 🟠 Major | ⚡ Quick win
删除工作流级
read-all。analysis已在 Lines 14-18 声明所需权限。工作流级read-all没有必要,并会使后续未覆盖权限的 job 获得全部读取权限。仅保留 job 级权限。🤖 Prompt for AI Agents
Source: Path instructions