OpenSSF Scorecard が指摘する 5 件のガバナンス項目は、いずれもリポジトリ設定 / 運用変更が必要で、PR では解消できません。各項目の対応コストと手順をまとめます。
killertcell428/aigis
| 項目 | 重要度 | 対応コスト | 推奨 |
|---|---|---|---|
| BranchProtection | error | 5分 | 今すぐ設定 |
| Maintained | info | 時間経過 | 放置でOK(90日後に自動解消) |
| CodeReview | info | 運用変更 | BranchProtection と一緒に解決 |
| CIIBestPractices | info | 30分〜数時間 | OSS 公開ならやる価値あり |
| Fuzzing | info | 数日 | 後回しでOK |
| Token-Permissions (job-level) | info | — | 受容 (§6) |
| Pinned-Dependencies (local install) | info | — | 受容 (§6) |
Scorecard 指摘: branch protection not enabled for branch 'master'
masterLint & Type Check, Test / Python 3.11, Test / Python 3.12, Build packagegh)gh api -X PUT repos/killertcell428/aigis/branches/master/protection \
-F required_status_checks.strict=true \
-F 'required_status_checks.contexts[]=Lint & Type Check' \
-F 'required_status_checks.contexts[]=Test / Python 3.11 (ubuntu-latest)' \
-F 'required_status_checks.contexts[]=Test / Python 3.12 (ubuntu-latest)' \
-F 'required_status_checks.contexts[]=Build package' \
-F enforce_admins=true \
-F required_pull_request_reviews.required_approving_review_count=1 \
-F required_pull_request_reviews.dismiss_stale_reviews=true \
-F restrictions= \
-F required_linear_history=true \
-F allow_force_pushes=false \
-F allow_deletions=false
本リポは既に以下の Branch Protection を有効化済(gh api repos/killertcell428/aigis/branches/master/protection で確認):
Lint & Type Check, Test / Python 3.11, Test / Python 3.12required_approving_review_count = 0 — 1 人開発のため意図的Scorecard alert #8 Branch-Protection (High) が残っているのは、最後の required_approving_review_count = 0 に起因する。これは「自分の PR を自分でマージできる必要がある」というソロ開発の現実的制約で、外部コントリビュータが現れたら approval=1 に上げる方針。Won't fix として dismiss する。
dismiss 文言テンプレ:
Won't fix — solo developer repo. Branch protection enforces status
checks, signed commits, linear history, and admin enforcement; only
required_approving_review_count is 0 (would block all merges otherwise).
Will raise to 1 once a second maintainer joins.
See docs/scorecard-governance-setup.html §1.
Scorecard 指摘: Repository was created within the last 90 days
これは「メンテされていることの証拠が不足している」という指摘で、リポジトリが 90 日以上経過して継続的にコミットがあれば自動的に解消されます。対応不要。
Scorecard alert を Code scanning UI から Dismiss → Won't fix で消すこともできます(コメント例: "Repo just created; will resolve naturally with time.")。
Scorecard 指摘: Found 0/30 approved changesets
BranchProtection で Require approvals (1+) を有効化し、今後のマージは PR 経由+承認必須にすれば、徐々に approved changeset が積み上がってスコアが上がります。BranchProtection の設定と同時に解決可能。
Scorecard 指摘: no effort to earn an OpenSSF best practices badge detected
https://github.com/killertcell428/aigis[](https://www.bestpractices.dev/projects/<ID>)
このバッジが README に存在するだけで Scorecard はパスを検出します。
Scorecard 指摘: no fuzzer integrations found
このリポの主要コードパス(detector regex / decoder pipeline)はファジング対象として有意義です。ただし統合には数日の作業が必要。
Google の Atheris を使うと、Python 関数を libFuzzer ハーネスで fuzz できます。
fuzz/ ディレクトリ作成fuzz/fuzz_scan.py
import atheris
import sys
with atheris.instrument_imports():
from aigis import scan
def TestOneInput(data: bytes):
try:
text = data.decode("utf-8", errors="replace")
except Exception:
return
scan(text)
atheris.Setup(sys.argv, TestOneInput)
atheris.Fuzz()
.github/workflows/cifuzz.yml を追加(OSS-Fuzz の CIFuzz アクション利用が標準)後回しでOK。先に他の項目を片付けてから検討。
Scorecard が High / Medium で機械的に検出するが、構成上「これ以上絞れない/絞ると別のリスクが増える」種類のアラートを明示的に受容する方針を以下に定める。新しいアラートが同じカテゴリで上がった場合、本セクションに照らして dismiss 可否を判断する。
contents: write は許容、top-level は禁止方針:
permissions: contents: read(または最小権限)を設定する。write 権限は 必要な job の permissions: ブロックでのみ付与する。write を High として検出しても dismiss 可。根拠:
GITHUB_TOKEN は job 単位でスコープされるため、job-level に絞った時点で他 job への漏出は防げる。write の出現を機械的にカウントするため、正しいスコープであっても High として残る既知の挙動。対応済アラート:
| Alert | ファイル | 用途 | 判断 |
|---|---|---|---|
| #179 | .github/workflows/release.yml:134 |
github-release job — GitHub Release 作成のため contents: write 必須 |
受容 (build/publish-pypi job は OIDC 化済で contents: read) |
| #180 | .github/workflows/sync-zenn-qiita.yml:16 |
Zenn→Qiita 変換後の public/ commit + push |
受容 |
| #181 | .github/workflows/zenn-deploy-trigger.yml:14 |
Zenn deploy トリガーの empty commit push | 受容 |
dismiss 文言テンプレ(Code scanning UI で使用):
Won't fix — job-level permissions are correctly scoped per
docs/scorecard-governance-setup.html §6.1.
Top-level is contents:read; this job's write scope is the
minimum required for its function.
pip install は許容方針:
--require-hashes)を導入する。pip install .) は hash pin 不要として受容する。Dockerfile / .clusterfuzzlite/Dockerfile ともに digest pin 済)。根拠:
対応済アラート:
| Alert | ファイル | 内容 | 判断 |
|---|---|---|---|
| #175 | .clusterfuzzlite/build.sh:8 |
pip3 install --no-cache-dir . — ローカル aigis ソースの install |
受容 (ネットワーク取得なし) |
dismiss 文言テンプレ:
Won't fix — installs local source only (no PyPI download),
no supply-chain surface. See docs/scorecard-governance-setup.html §6.2.
以下は受容も修正もせず、運用コストとのトレードオフを継続検討する:
Dockerfile:6 の pip install pip==26.1.1 build==1.5.0 の hash pin 化。pip-compile --generate-hashes 運用が現実的か要検討。すべて設定後、Scorecard を再実行して結果を確認できます:
# GitHub Actions の Scorecard workflow を手動実行
gh workflow run scorecard.yml -R killertcell428/aigis
# または scorecard CLI(要 GITHUB_AUTH_TOKEN)
docker run -e GITHUB_AUTH_TOKEN=ghp_xxx \
gcr.io/openssf/scorecard:stable \
--repo=github.com/killertcell428/aigis
Code scanning UI でアラートが Closed に変わります(次回スキャン後)。
Generated 2026-05-11 — Aigis governance setup guide