AGENT SKILL

lang-yaml

YAML schema-first validation, safe deserialization (safe_load), duplicate key rejection, anchor limits, and secret scrubbing.

License 许可
MIT
所属仓库
poppyTM/oride
最近更新
2026-09-30
Stars
★ 1
Forks
0

01 前言 Front Matter

name
lang-yaml
description
YAML schema-first validation, safe deserialization (safe_load), duplicate key rejection, anchor limits, and secret scrubbing.

02 资源文件 6

03 SKILL.md 正文

YAML Engineering & Safety Contract

1. Schema-First Validation

  • All structured YAML manifests (Kubernetes, GitHub Actions, application configs) must be validated against a formal JSON Schema or tool (e.g. `kubeconform`).
  • Adhere strictly to Yamllint rules (two-space indentation, document start `---`, newline at EOF).

2. Safe Deserialization & Parser Security

  • Application parsers must use safe loaders (`yaml.safe_load`, PyYAML `SafeLoader`, Go `gopkg.in/yaml.v3`). Prohibit custom object instantiation.
  • Strictly reject duplicate mapping keys.
  • Limit YAML anchor (`&anchor`) and alias (`*alias`) nesting to prevent exponential entity expansion (billion-laughs DOS).

3. Explicit Typing & Secret Protection

  • Quote ambiguous string literals that can be coerced to booleans or numbers (e.g. `"yes"`, `"no"`, `"true"`, `"1.0"`).
  • Zero plaintext secrets in YAML files. Use Secret references, KMS, or Vault injections.\n

04 同仓库更多 Skills