Actions: imprecise action references in model data
- 主要言語
- CodeQL
- スター
- 10.1k
- フォーク
- 2.1k
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 141
説明
First of all, thanks for your hard work! I'm a huge fan of CodeQL, and I think support for GitHub Actions within it is amazing.
I'm filing this because I recently tried to consume some of CodeQL's "models" in an external tool (https://github.com/zizmorcore/zizmor/pull/849), and noticed what I _think_ is a model imprecision/data quality issue.
## Description
For example, `actions/ql/lib/ext/generated/composite-actions/airbytehq_airbyte.model.yml`:
```yaml
extensions:
- addsTo:
pack: codeql/actions-all
extensible: actionsSinkModel
data:
- ["airbytehq/airbyte", "*", "input.options", "code-injection", "generated"]
- ["airbytehq/airbyte", "*", "input.subcommand", "code-injection", "generated"]
```
([Permalink](https://github.com/github/codeql/blob/f6231a37e119a2a4b263e7d521e61fda40b80ec7/actions/ql/lib/ext/generated/composite-actions/airbytehq_airbyte.model.yml))
This implies that `airbytehq/airbyte` has a top-level `action.ya?ml` definition, but it doesn't: instead, it has a set of actions defined under `airbytehq/airbyte/.github/actions`, of which `run-airbyte-ci` appears to have the relevant injectable inputs:
```yaml
name: "Run Dagger pipeline"
description: "Runs a given dagger pipeline"
inputs:
subcommand:
description: "Subcommand for airbyte-ci"
required: true
```
([Permalink](https://github.com/airbytehq/airbyte/blob/1804c4958793342168b99dd938f781bc764e9c6a/.github/actions/run-airbyte-ci/action.yml))
This appears to be true in most other model files in that directory, at least the ones marked with `"generated"` in their definitions.
## Expected behavior
Given that the inputs in question occur in in an action that isn't at the repository root, I expected the model YAML to look roughly like this:
```yaml
extensions:
- addsTo:
pack: codeql/actions-all
extensible: actionsSinkModel
data:
- ["airbytehq/airbyte/.github/actions/run-airbyte-ci", "*", "input.options", "code-injection", "generated"]
- ["airbytehq/airbyte/.github/actions/run-airbyte-ci", "*", "input.subcommand", "code-injection", "generated"]
```
## Actual behavior
The model YAML lists `airbytehq/airbyte`, leaving it unclear *which* actions within that repository have the injectable inputs.
コントリビューションガイド
調査の方向性
actions/ql/lib/ext/generated/composite-actions/airbytehq_airbyte.model.yml から始め、その repository reference をリンクされている .github/actions/run-airbyte-ci/action.yml と比較します。"generated" とマークされた他の生成済みモデルファイルを調べ、同じパスの問題が広範囲に存在するかどうかを判断します。完了条件は、生成されたエントリが各 input を含む具体的なネストされた action を特定することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- github-actions, yaml
- 領域
- security
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 38/100