本文へ移動
cccskills
無料GitHub で公開

principle-security-by-construction

Apply when designing, implementing or reviewing NeoHaskell framework trust boundaries, authorization, secret handling, data isolation or resource access. Put security guarantees in owning APIs and safe defaults, grounded in reachable flows.

日本語の概要は準備中です。原文の説明を表示しています。

neohaskell/NeoHaskellスター 348(GitHub 348 + cccskills 0)

実行スコア 未検証

インストール方法を見る

含まれるファイル(1)

  • SKILL.md5.3 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Security by Construction

Make the framework's natural API protect its users. Apply this principle to framework-owned APIs, capabilities and execution; applications own their payload schemas, business semantics and policies. Preserve the documented behavior of the mechanisms through which applications supply those choices. Review the actual data flow and authority of each operation; Haskell types and pure code help express guarantees, but the guarantees still depend on construction, decoding and execution. For parsing, type and API details, consult Boundary Discipline and NeoHaskell best practices when needed.

  1. Trace trust and authority. Identify the caller, protected data or capability, external inputs, and the service/interpreter that can act on them. Follow every reachable entrypoint, including generated handlers and cross-service dispatch. Distinguish authenticated identity, permission to act, and visibility of returned data or metadata. Passing a RequestContext is not itself authorization proof; verify how authority is established and enforced. Make framework-granted authority for background dispatch explicit; historical actor metadata alone must not grant authority to a new operation. Invoke application policy hooks according to their documented contract.
  2. Own the guarantee. Parse raw representations into domain types at the owning boundary. Inspect constructors, decoders and conversions before trusting a newtype's invariant. Keep operation-specific authorization, tenant/resource scoping and atomic checks where the protected operation runs. Preserve established invariants inside pure code rather than adding repeated guards to callers. Preserve event-store ordering, append preconditions, event identity and delivery contracts through framework serialization and reconstruction. Make decode failures and incomplete reconstruction explicit at the owning API. Prefer framework-owned safe defaults over asking every downstream user to remember another check or setting.
  3. Protect secrets through every output path. Reuse Redacted and owned crypto APIs where applicable; inspect logging, formatting, exceptions, diagnostic labels and serialization as well as Show. A wrapper's safe display does not make unwrapping or every encoder safe. Derived instances are acceptable when their actual behavior preserves the required protection. Use established verification and cryptographic randomness for access-bearing secrets, without inventing cryptographic protocols or imposing secret-handling machinery on public identifiers and ordinary retry jitter. Keep public errors useful without exposing credentials or private internals.
  4. Constrain effectful boundaries. Use the storage owner's parameterized statement/codec APIs for external values. Handle dynamic identifiers with their actual safe construction/quoting rules; a typed wrapper alone does not sanitize them. Follow input through any process, filesystem, network or outbound-request boundary the change reaches. Specify which framework execution paths reconstruct state and which may invoke external effects, including what retries can repeat after partial success. Expose delivery guarantees and relevant retry context so application integrations can handle duplicates. Check query/tenant isolation and authorization of counts or other metadata. For changed dependencies, generators or build fetches, inspect provenance and the repository's actual pin/integrity mechanism rather than assuming a lockfile or a type guarantees trust.
  5. Bound attacker-controlled work. Put input size, scan/replay work, queue/admission, retry and resource-lifetime controls at the subsystem that owns the cost. A small returned page does not bound a full-store scan; a process-local limiter does not establish a deployment-wide limit. Preserve cancellation, cleanup and isolation under rejection or failure. Coordinate with Design for Throughput, keeping security checks and durability guarantees in the efficient path.

For each design concern or review finding, state the reachable input, affected guarantee, concrete impact and proportionate remedy. Distinguish an observed defect from a design risk or an unknown; do not invent an attacker path or a compliance obligation. Distinguish guarantees enforced by the framework from backend capabilities and application/operator responsibilities; state the configuration and failure/recovery assumptions that limit each claimed guarantee. Reuse existing contract suites, including the event-store specifications; extend relevant negative cases, isolation checks or properties only where the changed guarantee needs evidence. Keep sensitive investigation details and evidence under ignored .agents-state/; publish only material appropriate to the task's authorized audience. This principle adds design and review guidance, not a separate approval pipeline or mandatory review-record format.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

architect

無料

Sketch types, signatures, and module structure before code, then stay in the loop while implementation fills in. Use for /architect, 'architect this', 'design this', or non-trivial work where jumping to code would lock in the wrong shape.

日本語の概要は準備中です。原文の説明を表示しています。

neohaskell/NeoHaskell3482026年10月26日 更新

arena

無料

Spawn N parallel candidates at the same task, pick a base, graft the strongest parts of the losers into it. Use for /arena, 'arena this', 'throw it in the arena', or when one attempt at a non-trivial artifact would lock in the wrong shape.

日本語の概要は準備中です。原文の説明を表示しています。

neohaskell/NeoHaskell3482026年10月26日 更新

babysit

無料

Inspect or supervise a PR or stack through review and CI to merge-ready, using current GitHub evidence and the requested mode.

日本語の概要は準備中です。原文の説明を表示しています。

neohaskell/NeoHaskell3482026年10月26日 更新

Vet a perf measurement (limiter, tuning, limits, errors, repeatability, relevance, and whether the work happened) before you report or act on it. Use when you benchmark or report a measured speedup or regression, including complete framework flows and compilation of projects that consume the framework.

日本語の概要は準備中です。原文の説明を表示しています。

neohaskell/NeoHaskell3482026年10月26日 更新

bro

無料

Restate the last message in plain human language, with no jargon.

日本語の概要は準備中です。原文の説明を表示しています。

neohaskell/NeoHaskell3482026年10月26日 更新

Build or adapt a local harness to drive, inspect, and profile an interactive CLI or TUI without external services. Use for CLI UX checks, startup regressions, memory leaks, hangs, prompt flows, or terminal demos.

日本語の概要は準備中です。原文の説明を表示しています。

neohaskell/NeoHaskell3482026年10月26日 更新

neohaskell のスキルをすべて見る

このスキルの問題を報告する