github / github/vscode-github-actions
false positive error on `secrets` context access in forks
- 主要語言
- TypeScript
- 星號
- 660
- 分支
- 213
- PR 合併指標
- 30 天內沒有已合併 PR
描述
For a workflow that accesses secrets:
```yml
- name: "publish npm"
uses: "./.github/actions/publish-npm"
env:
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
```
The extension is very helpful in checking if the secret `NPM_TOKEN` is actually defined or not.
However, it only checks secrets defined in the same repository (I suspect `origin` remote), and reports a false-positive error if it was defined in `upstream`, and `origin` is actually pointing to a fork:
> Context access might be invalid: NPM_TOKEN
**Expected behavior**
All remotes to be checked for secrets, not just `origin`, and the error is no longer reported.
**Screenshots**
**Extension Version**
`v0.26.3`
貢獻指南
研究方向
首先定位 extension 對 GitHub Actions secrets 的驗證邏輯,以及它如何判斷要檢查的 repository 或 remotes。重現 issue 中描述的 fork 和 upstream 情境,然後確認在 upstream 中定義的 secret 不再產生誤報的 context-access 錯誤。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- github-actions, typescript, vscode
- 領域
- ci-cd, devtools
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100