feat(core): YAML policy format with transformation functions via `!` tags
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
調査の方向性
既存の JSON ポリシーの検証・評価パスから始め、次に issue で言及されている tirith lint と tirith fmt のエントリポイント、および #366 の関連作業を追跡します。完了の条件は、YAML ポリシーが JSON と同様に評価され、承認されたタグが値ごとのエラーとともに値を変換し、未知のタグが明確に失敗し、lint/format と builder のラウンドトリップが機能し、ドキュメントに JSON/YAML の比較が含まれることです。
索引モデルが issue の本文から書いたものです。
説明
Policies are JSON-only today. Support YAML as a first-class policy format: the same schema (YAML is
a superset, so every existing policy has a 1:1 YAML twin), plus YAML custom tags — the ! prefix —
as declarative transformation functions inline in the policy:
meta:
version: v1
provider: stackguardian/terraform_plan
evaluators:
- id: task_def_count
provider_args:
operation_type: attribute
terraform_resource_type: aws_ecs_task_definition
terraform_resource_attribute: !json_decode container_definitions
condition:
type: LessThanEqualTo
value: !length
Design constraints
- Tags are data, not code: a fixed whitelist of transformation tags (e.g.
!length,
!json_decode,!lower) parsed with a safe YAML loader — an unknown tag is a validation error,
never an arbitrary constructor. This keeps the format Builder-friendly. - The tags are surface syntax over the same transformation pipeline planned for
condition.transform— one implementation, two spellings. A minimal function set can ship with
the format; the fuller coercion layer (dates, CIDR, sizes) extends it later. - Each transformation step wraps errors per value (a failed decode is a provider error on that
resource, not a crashed run). tirith lint/tirith fmt(#366) must accept and format YAML policies; validation and the
interactive builder round-trip both formats.
Acceptance. A .yaml policy evaluates identically to its JSON twin; ! tags apply the shared
transformations with per-value error handling; an unknown tag fails validation with a clear
message; tirith lint/fmt handle YAML; docs show a side-by-side JSON/YAML example.
- 主要言語
- Python
- スター
- 170
- フォーク
- 46
- 平均マージ
- 1日 20時間
- マージ済み PR(30日)
- 9
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
StackGuardian/tirith のほかの issue
-
chore: remove stale TODOs and commented-out code対応中かも @krishna2707 が 1 日前に担当しました。 オープンchore good first issue hacktoberfest
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
StackGuardian/tirith#408 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
test(evaluators): edge cases for `Equals` and `NotEquals`対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンgood first issue hacktoberfest tests
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
StackGuardian/tirith#406 ·
メンテナーはふだん 1 日以内に返信
-
good first issue hacktoberfest tests
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
StackGuardian/tirith#405 ·
メンテナーはふだん 1 日以内に返信
-
fix(kubernetes): missing `kubernetes_kind` or `attribute_path` errors are dropped対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug good first issue hacktoberfest
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
StackGuardian/tirith#404 ·
メンテナーはふだん 1 日以内に返信
-
good first issue hacktoberfest tests
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
StackGuardian/tirith#403 ·
メンテナーはふだん 1 日以内に返信
StackGuardian/tirith の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
jbacalso24/mimry#291 ·
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 2/5 1時間未満 初心者へのやさしさ 82/100
eli-alvarado/us-watchlist-alerts#14 ·
メンテナーはふだん 1 日以内に返信
-
from-review-extraction python severity:nit
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
LearningCircuit/local-deep-research#7462 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
cathrynlavery/diagram-design#441 ·
メンテナーはふだん 2 日以内に返信
-
[Cleanup] Include the public header in work_split.cpp対応中かも @blozano-tt が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
tenstorrent/tt-metal#60850 ·
メンテナーはふだん 1 日以内に返信