Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

feat(core): YAML policy format with transformation functions via `!` tags

オープン
#375 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
cli, security

調査の方向性

既存の JSON ポリシーの検証・評価パスから始め、次に issue で言及されている tirith lint と tirith fmt のエントリポイント、および #366 の関連作業を追跡します。完了の条件は、YAML ポリシーが JSON と同様に評価され、承認されたタグが値ごとのエラーとともに値を変換し、未知のタグが明確に失敗し、lint/format と builder のラウンドトリップが機能し、ドキュメントに JSON/YAML の比較が含まれることです。

索引モデルが issue の本文から書いたものです。

説明

enhancement

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

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

StackGuardian/tirith のほかの issue

StackGuardian/tirith の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。