github / github/vscode-github-actions

false positive error on `secrets` context access in forks

未关闭
#375 3 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
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**

image

**Extension Version**
`v0.26.3`

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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