Skip to content

chore(security): resolve OSSF Scorecard alerts#96

Merged
seonghobae merged 1 commit into
developfrom
fix-ossf-scorecard-alerts
Mar 27, 2026
Merged

chore(security): resolve OSSF Scorecard alerts#96
seonghobae merged 1 commit into
developfrom
fix-ossf-scorecard-alerts

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

Summary

  • Drop top-level write permissions across all workflows
  • Restrict 'security-events: write', 'contents: write', and 'pull-requests: write' strictly to the jobs that need them
  • Upgrade 'security-audit.yml' to use 'uvx pip-audit' to resolve Pinned-Dependencies alert

- Drop top-level write permissions across all workflows
- Restrict 'security-events: write', 'contents: write', and 'pull-requests: write' strictly to the jobs that need them
- Upgrade 'security-audit.yml' to use 'uvx pip-audit' to resolve Pinned-Dependencies alert
@coderabbitai

coderabbitai Bot commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: e00c9ff7-b8e3-4a0e-9abc-173f22f87fd8

📥 Commits

Reviewing files that changed from the base of the PR and between 6126dff and 7a92797.

📒 Files selected for processing (6)
  • .github/workflows/ci.yml
  • .github/workflows/codeql.yml
  • .github/workflows/dependency-review.yml
  • .github/workflows/sbom.yml
  • .github/workflows/security-audit.yml
  • .github/workflows/trivy.yml

Cache: Disabled due to Reviews > Disable Cache setting

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Summary by CodeRabbit

릴리스 노트

  • Chores
    • GitHub Actions 권한을 최소화해 CI 보안을 강화했습니다.
    • 일부 보안·취약점 스캔 워크플로우 권한을 작업 단위로 제한했습니다.
    • 릴리스 시점에 소프트웨어 명세서(SBOM)를 생성·첨부하는 별도 작업을 추가했습니다.
    • 파이썬 취약점 감사 실행 방식을 개선하여 도구 실행 안정성을 향상시켰습니다.

Walkthrough

워크플로우 수준 권한을 작업 수준으로 이동시키고(SARIF/PR 권한 재할당), SBOM 아티팩트 처리 및 릴리스 업로드를 신규 작업으로 분리했으며, pip-audit 호출을 uvx 기반 실행으로 변경했습니다.

Changes

Cohort / File(s) Summary
워크플로우 기본 권한 추가
​.github/workflows/ci.yml
워크플로우 수준에 permissions: contents: read 추가.
권한 범위 조정 (워크플로우 → 작업)
​.github/workflows/codeql.yml, ​.github/workflows/dependency-review.yml, ​.github/workflows/trivy.yml
워크플로우 최상단에서 security-events: write / pull-requests: write 제거하고, 해당 권한들을 각각 필요한 job 수준의 permissions 블록으로 재배치.
SBOM 파이프라인 분리 및 권한 변경
​.github/workflows/sbom.yml
sbom 작업의 contents: writecontents: read로 축소. 릴리스 시 실행되는 release-sbom 작업 추가(의존성: sbom), 아티팩트 다운로드 후 GitHub Release에 업로드하도록 구성 및 해당 작업에 contents: write 부여.
보안 감사 도구 실행 방식 변경
​.github/workflows/security-audit.yml
pip-audit 직접 설치/실행 방식 제거; uvx를 통해 pip-audit==2.8.0 실행하도록 커맨드 변경(입력 파일 및 옵션 유지).

Sequence Diagram(s)

sequenceDiagram
    participant SB as "sbom job"
    participant AS as "Artifact Storage\n(GHA artifacts)"
    participant RS as "release-sbom job"
    participant GR as "GitHub Releases API"

    rect rgba(200,200,255,0.5)
    SB->>AS: sbom 생성 후 아티팩트 업로드 (`bandscope-sbom`, `bandscope-supply-chain-inventory`)
    end

    rect rgba(200,255,200,0.5)
    RS->>AS: 의존성으로 `sbom` 성공 후 아티팩트 다운로드
    RS->>GR: 아티팩트 첨부를 위해 Release API에 업로드 (요구: contents: write)
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 분

Possibly related PRs

🐰 권한은 작은 당근처럼,
필요한 일만 주고받지요.
아티팩트는 안전히 싣고,
릴리스 문에 살포시 올리니,
uvx로 속삭이며 파이프라인 춤을 춥니다. 🥕✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-ossf-scorecard-alerts

Comment @coderabbitai help to get the list of available commands and usage tips.

@seonghobae

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Mar 27, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@seonghobae seonghobae enabled auto-merge (squash) March 27, 2026 02:30
@seonghobae seonghobae merged commit f7da39b into develop Mar 27, 2026
22 of 23 checks passed
seonghobae added a commit that referenced this pull request Mar 28, 2026
- Drop top-level write permissions across all workflows
- Restrict 'security-events: write', 'contents: write', and 'pull-requests: write' strictly to the jobs that need them
- Upgrade 'security-audit.yml' to use 'uvx pip-audit' to resolve Pinned-Dependencies alert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant