airqo-platform / airqo-platform/AirQo-api

Pin dependencies by hash and restrict GitHub Actions workflow token permissions

未关闭
#6,960 0 条评论 0 个 reaction 已指派 1 人 已被 @Psalmz777 认领 在 GitHub 查看
主要语言
JavaScript
星标
26
派生
24
平均合并
5 小时 36 分钟
30 天内合并 PR
81

描述

## Summary
OpenSSF Scorecard flags two related supply-chain hardening gaps:
- **Pinned-Dependencies: 0/10** — dependencies (npm packages and/or GitHub Actions) are not pinned by hash
- **Token-Permissions: 0/10** — one or more workflows in `.github/workflows/` grant excessive `GITHUB_TOKEN` permissions (broader than needed, e.g. default `write-all` instead of least-privilege)

## Tasks
- [ ] Audit `.github/workflows/*.yml` and add an explicit `permissions:` block (least privilege) to every workflow/job that's missing one
- [ ] Pin third-party GitHub Actions to a full commit SHA instead of a floating tag (e.g. `actions/checkout@` not `@v4`)
- [ ] Evaluate pinning critical npm dependencies by hash/lockfile integrity where feasible
- [ ] Re-run Scorecard and confirm both checks move off 0

## Why this matters
Unpinned actions/dependencies and overly-broad workflow tokens are classic supply-chain attack surfaces (tag mutation, compromised upstream releases). Both are cheap, mechanical fixes with an outsized Scorecard impact.

## References
- Scorecard checks: `Pinned-Dependencies` (score 0), `Token-Permissions` (score 0)
- `.github/workflows/`

贡献指南

打开贡献指南

调研方向

Start by auditing the workflows under `.github/workflows/*.yml`, checking each workflow or job for missing permissions and floating third-party action references. Review the npm dependency metadata for feasible integrity pinning, then re-run the OpenSSF Scorecard checks; done means both `Pinned-Dependencies` and `Token-Permissions` have moved off 0.

由索引模型根据 Issue 内容生成。

评估

技术栈
github-actions, javascript
领域
ci-cd, security
Issue 类型
重构
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。