[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AB6QW54HQ8JTRADE6NQ52X":3,"skill-same:01M7AB6QW54HQ8JTRADE6NQ52X":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7AB6QW54HQ8JTRADE6NQ52X","secrets-management",null,"application \u002F serviceのenvironment secretをInfisical中心で設計・初期化・移行・検証する時に使用する。CLI-first、repository-controlled schema、Machine Identity、GitHub OIDC、agent least-privilege、secret-safe evidenceを扱う。","rebuildup\u002Fproject-init","rebuildup","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F176191237?v=4","01M7AB3QGQ73Q2YNFNFGPAVVRX","samuido","01M7AB3QHEEN3RPZSTXYW3062Y",2,"MIT","https:\u002F\u002Fgithub.com\u002Frebuildup\u002Fproject-init\u002Fblob\u002Fmain\u002Fskills\u002Fsecrets-management\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: secrets-management\ndescription: application \u002F serviceのenvironment secretをInfisical中心で設計・初期化・移行・検証する時に使用する。CLI-first、repository-controlled schema、Machine Identity、GitHub OIDC、agent least-privilege、secret-safe evidenceを扱う。\n---\n\n# Secrets Management\n\napplication \u002F serviceのsecret管理を、人間・agent・CI\u002FCDが同じauthority modelで扱えるようにする。\n\ncurrent default providerはInfisicalで、current default control planeはself-hosted `https:\u002F\u002Fsecrets.rebuildup.dev` だが、目的はprovider adoptionそのものではない。守るべき性質は、secret valueのcanonical authority、least privilege、plaintext persistence回避、schema discoverability、recoverability、agent-safe evidenceである。\n\n原則:\n\n> **Secret values live in the secret provider. Secret contracts live in the repository. Access is identity-scoped and injected only where needed.**\n\n## 1. Responsibility boundary\n\nこのSkillが所有する:\n\n- application \u002F service env secretのSoT設計\n- Infisical project \u002F environment \u002F path構成\n- repository-controlled env schemaとの分離\n- local CLI workflow\n- Machine Identity \u002F human identityの責務分離\n- GitHub Actions OIDC integration\n- agent \u002F workerへのsecret capability付与\n- plaintext `.env` \u002F GitHub Secrets \u002F SOPS等からのmigration\n- secret-safe validation \u002F evidence\n- provider unavailable時のdeviation評価\n\nこのSkillが所有しない:\n\n- application固有のcredential発行元でのrotation semantics\n- cloud IAM全体のarchitecture\n- vulnerability hunting全般\n- production secret値そのもののレビュー\n- security\u002Fprivacy risk acceptance\n\n接続先:\n\n- unknown secret-handling vulnerability -> `security-audit`\n- GitHub workflow \u002F delivery -> `github-delivery`\n- worker isolation \u002F credential injection boundary -> `sandbox-runtime`\n- runtime validation -> `quality-gate`\n- provider selection deviation \u002F security-cost decision -> `engineering-decisions`\n- durable recovery -> `agent-recovery`\n\n## 2. Canonical authority split\n\nsecret valueとenvironment contractを同じSoTへ押し込まない。\n\n### Secret value\n\ncurrent application\u002Fservice default:\n\n```text\nInfisical (current default: https:\u002F\u002Fsecrets.rebuildup.dev)\n└─ project\n   ├─ dev\n   ├─ staging\n   └─ prod\n```\n\nInfisical側がcanonical value authorityを持つ。\n\n### Secret contract\n\nrepository側が次をcanonicalに持つ。\n\n- key name\n- required \u002F optional\n- type \u002F shape\n- non-secret default\n- environment applicability\n- owning component\n- validation rule\n- description that does not reveal the value\n\nproject stackに応じてtyped env schema、config schema、`.env.example`、generated metadata等を使用する。\n\n`.env.example`を使う場合はreal secretを入れず、placeholder \u002F empty value \u002F non-secret defaultだけを置く。\n\nfresh agentがInfisicalのsecret valueを読むことなく、必要keyとvalidation contractを理解できる状態を維持する。\n\n## 3. When Infisical is the default\n\n次を満たすapplication \u002F serviceではInfisicalをdefaultとする。\n\n- runtimeがenvironment secretを必要とする\n- developer \u002F CI \u002F deployment等、複数principalからaccessする可能性がある\n- secret valueをGit historyへ置く必要がない\n- online secret providerへ到達できる\n\n次はautomatic adoption対象にしない。\n\n- NixOS \u002F dotfiles \u002F bootstrap等でencrypted secret-in-Gitがexplicit requirement\n- offline-first runtime\n- provider-native storeだけを使う明確なplatform requirement\n- regulation \u002F hosting \u002F network constraintでInfisicalを利用できない\n\ndeviationはprovider名ではなく、同等以上のguaranteeで評価する。\n\n## 4. Initialization \u002F reconciliation\n\n初期化時は作成前にcurrent stateを調査する。\n\n確認:\n\n1. env schema \u002F validation source\n2. `.env` \u002F `.env.*` \u002F secret-like config\n3. `.gitignore`\n4. GitHub Actions secrets \u002F variablesへの依存\n5. existing secret manager \u002F SOPS \u002F cloud secret store\n6. runtime \u002F deploy environment\n7. CI jobs that actually require secret access\n8. developer bootstrap path\n9. repository visibility and agent\u002Fruntime trust boundaries\n\ndesired state:\n\n```text\nrepository\n├─ source\n├─ env schema \u002F non-secret metadata\n├─ provider pointer\u002Fconfig\n│  ├─ site\u002FAPI endpoint\n│  ├─ project ID\n│  └─ environment\u002Fpath mapping\n└─ no canonical plaintext secret\n\nInfisical\n└─ canonical secret values\n\nhuman \u002F agent \u002F CI\n└─ scoped identity\n   └─ runtime injection\n```\n\nidempotentに:\n\n`initialize if missing -> repair if incomplete -> update if stale -> verify if already correct`\n\nを適用する。\n\n## 5. CLI-first human workflow\n\nWeb UIをnormal workflowの必須surfaceにしない。\n\ncurrent default instance:\n\n```text\nsite: https:\u002F\u002Fsecrets.rebuildup.dev\napi:  https:\u002F\u002Fsecrets.rebuildup.dev\u002Fapi\n```\n\n標準bootstrap:\n\n```bash\nexport INFISICAL_API_URL=https:\u002F\u002Fsecrets.rebuildup.dev\u002Fapi\ninfisical login --domain=https:\u002F\u002Fsecrets.rebuildup.dev\ninfisical init\n```\n\nただしtracked project bindingが既に存在するrepositoryでは `infisical init` をfresh setupのたびに再実行しない。existing bindingを検証し、欠落・stale時だけreconcileする。\n\nprovider pointer\u002Fconfigにsecret valueを含めないことを確認し、current defaultで使用するsite\u002FAPI URL、project ID、environment\u002Fpath mapping等のsafe metadataをrepositoryからdiscoverableにする。\n\nwrapper \u002F task \u002F CIはcurrent provider endpointを明示し、Infisical CLIのvendor default endpointへ暗黙fallbackさせない。current default profileでmanaged Cloudへ意図せず接続するのはconfiguration driftとして扱う。\n\n通常実行:\n\n```bash\nINFISICAL_API_URL=https:\u002F\u002Fsecrets.rebuildup.dev\u002Fapi \\\n  infisical run --env=dev --path=\u002Fbackend -- \u003Ccommand>\n```\n\nprojectにstable local command interfaceがある場合は、provider-specific invocationを薄く包んでよい。\n\n例:\n\n```text\nenv:run \u003Ccommand>\nenv:check\nenv:schema\n```\n\nwrapperはsecret valueをprint\u002Fexportせず、underlying provider failureを隠さない。\n\nWeb UIはinspection \u002F emergency administration \u002F onboarding \u002F access review等に使用できるが、agentや通常developer taskの必須stepとして文書化しない。\n\n### Control-plane automation\n\nproject \u002F environment \u002F path \u002F Machine Identity \u002F permission \u002F OIDC trust等も、可能な範囲でheadlessにreconcileできるようにする。\n\n優先順位:\n\n1. Infisical CLIで安全に操作できるsurface\n2. official API\n3. Terraform \u002F OpenTofu等のofficial provider\n4. Web UIはbootstrap \u002F inspection \u002F emergency fallback\n\ncontrol-plane configurationをIaCへ置く場合、repositoryにはproject ID、identity ID、environment\u002Fpath、role\u002Fpolicy等のnon-secret stateだけを置く。secret valueやlong-lived auth credentialをTerraform\u002FOpenTofu stateへpersistさせない。provider capabilityがtime-sensitiveな場合はcurrent official documentationを確認する。\n\nWeb UIでしか行えなかった操作がある場合も、その事実と必要なresultをdurable documentationへ残し、画面操作そのものを唯一のrecoverability sourceにしない。\n\n## 6. Plaintext materialization\n\nruntime injectionを優先する。\n\n平文`.env`やexport fileがtool compatibility上必要な場合だけmaterializeする。\n\n必須条件:\n\n- Git対象外\n- pathが明示的にgitignored\n- lifecycleがtask\u002Fruntimeにbounded\n- file permissionを可能な範囲で絞る\n- logs \u002F Issue \u002F PR \u002F checkpointへvalueを出さない\n- 不要になったcopyを残さない\n\nplain `.env` をcanonical storeやonboarding distribution artifactとして扱わない。\n\n## 7. Agent \u002F worker access\n\nagentへ「Infisicalを使える」ことと「全secretを読める」ことを同義にしない。\n\ndefault:\n\n- Coordinator \u002F reviewer: secret accessなし\n- implementation worker: secret accessなし\n- local integrationで必要なworker: dev\u002Ftestの必要pathだけread\n- deployment worker: target environmentの必要pathだけread\n- secret maintenance actor: explicit write scopeだけ\n\nMachine Identity \u002F temporary identityは最低限次でscopeする。\n\n- project\n- environment\n- path\n- action\n- secret name\u002Ftag when practical\n- lifetime \u002F auth context when supported\n\nSupervisorはhost userのbroad credentialをsandboxへ無条件inheritさせない。\n\nsecret accessが必要なら、そのworker capabilityとして明示的に付与する。\n\n### Forbidden agent behavior\n\n- `env` 等でenvironment全体をdumpする\n- secret list取得を目的なく行う\n- valueをchat \u002F checkpoint \u002F artifactへ転写する\n- debugging目的でsecret valueをlogへ出す\n- broader identityへ切り替えてpermission errorを回避する\n\npermission不足はsecurity boundaryとして扱い、必要scopeを特定してから変更する。\n\n## 8. GitHub Actions\n\nGitHub ActionsからInfisicalへaccessする場合、current platformが対応していればOIDC + Machine Identityをdefaultとする。current default profileではidentity\u002Fcontrol planeを `https:\u002F\u002Fsecrets.rebuildup.dev` 側へ統一する。\n\ndesired trust chain:\n\n```text\nGitHub Actions job\n    ↓ short-lived OIDC token\nInfisical Machine Identity\n    ↓ scoped authorization\nrequired environment\u002Fpath secrets\n```\n\n標準:\n\n- GitHubにlong-lived Infisical master credentialを保存しない\n- workflowは必要なjobだけ `id-token: write`\n- `contents: read` 等、他permissionも最小化\n- OIDC issuer \u002F subject \u002F audience \u002F repository \u002F environment等をcurrent official contractに従ってrestrict\n- generic lint\u002Ftest jobへproduction secretを渡さない\n- production accessはdeployment\u002Frelease boundaryへ限定\n- identity ID \u002F project slug等のnon-secret identifierはsecretとして扱わない\n- OIDCをworkflow source protectionの代替にしない\n- secret-bearing workflowはtrusted branch \u002F protected environment \u002F applicable review boundaryからだけ実行する\n- untrusted PR codeをsecret取得後に実行しない。特に `pull_request_target` 等、base-contextのcredentialとuntrusted head codeを混在させるtriggerは明示的にsecurity reviewする\n\nOIDC非対応runtimeではUniversal Auth等をfallbackとして使用できるが、static credentialは最小scope、rotation可能、long-lived master keyではないものにする。\n\nGitHub Actions \u002F Infisical OIDCのclaim形式やofficial action syntaxはtime-sensitiveである。実装時にcurrent official documentationを確認し、古いexampleをblind copyしない。\n\n## 9. Environment \u002F path model\n\n環境はproject実態へ合わせる。\n\n標準候補:\n\n```text\ndev\nstaging\nprod\n```\n\npathはdeployment\u002Fcomponent boundaryを表現する。\n\n例:\n\n```text\n\u002Fshared\n\u002Fweb\n\u002Fbackend\n\u002Fworker\n\u002Fdeploy\n```\n\nすべてのprojectへ固定pathを強制しない。\n\n同じsecretを無秩序に複製するより、ownershipとconsumer boundaryを明確にする。\n\nprod credentialをdevへcopyして動作確認することを標準化しない。\n\n## 10. Schema and drift verification\n\nsecret valueを取得せずに可能な検証を優先する。\n\n最低限:\n\n- required keyがschemaに定義されている\n- provider上に必要keyが存在する\n- unknown\u002Fstale keyを検出できる\n- environment\u002Fpath mappingがconsumerと一致する\n- required secretがgeneric CIへ露出していない\n- application startup時のenv validationがある場合は実行する\n\nevidenceにはvalueではなく次を使用する。\n\n- key name\n- presence \u002F absence\n- schema validation result\n- environment\u002Fpath\n- identity scope\n- exit code\n- redacted\u002Fhash fingerprint when truly necessary\n\nhashもsmall-domain secretの推測材料になり得るため、必要性がない場合は記録しない。\n\n## 11. Secret mutation\n\nsecretの作成・変更・削除はconsequential external mutationとして扱う。\n\n変更前:\n\n- target project \u002F environment \u002F path \u002F key identityを確認\n- consumerとrollback pathを確認\n- write authorityを確認\n\n変更後:\n\n- valueを表示せずpresence \u002F version \u002F consumer behaviorを検証\n- dependent runtimeをcurrent valueで再検証\n- duplicate old storeが不要なら削除\n- rotationが必要ならcredential issuer側も含めて完了を確認\n\nsecret valueのPR reviewは行わない。review可能なartifactはschema、scope、consumer change、identity policy、validation evidenceである。\n\n## 12. Migration\n\n### Plaintext .env -> Infisical\n\n1. schema\u002Fkeyをrepository側で確定\n2. valuesをInfisicalへ安全にimport\n3. runtimeを`infisical run`等へ切り替え\n4. current runtimeを検証\n5. plaintext fileをcanonical workflowから除去\n6. historical exposureが疑われるvalueはrotate\n\n### GitHub Actions Secrets -> Infisical\n\n1. workflowごとのactual secret dependencyをinventory\n2. Machine Identity scopeを設計\n3. OIDC利用可能ならOIDCへ切り替え\n4. deployment jobでsecret取得を検証\n5. 不要になったGitHub Actions secretを削除\n\n### SOPS -> Infisical\n\napplication envを移す場合:\n\n1. encrypted file内のkey schemaをinventory\n2. valueをInfisicalへ移行\n3. local\u002FCI consumerを切り替え\n4. current runtimeを検証\n5. SOPS file \u002F decryption key dependencyを除去\n\nNix\u002Fdotfiles\u002Fbootstrap等 encrypted-in-Git が目的ならSOPSを無理に移行しない。\n\n## 13. Recovery \u002F provider outage\n\nself-hosted Infisical outageを理由にsecret valueをGitやchatへ退避しない。またavailability問題を理由にmanaged Infisical Cloudへ無断fallbackしてsecond canonical secret storeを作らない。\n\nproject stakesに応じて:\n\n- bounded local token\u002Fsession cache\n- provider-native HA\u002Fself-hosting\n- deployment platform側のruntime secret cache\n- documented emergency path\n\nを設計できる。\n\nemergency copyを作る場合もtemporary authorityとして扱い、復旧後にreconcile\u002Fdeleteする。\n\n## 14. Completion criteria\n\nsecrets managementを完了扱いするには最低限:\n\n- secret valueのcanonical authorityが一意\n- repositoryからrequired env contractをdiscoverできる\n- normal developer flowがCLIで完結\n- current default profileではself-host site\u002FAPI endpointがnon-secret metadataとして明示され、managed Cloudへ暗黙fallbackしない\n- project ID \u002F environment\u002Fpath mapping等のprovider pointerがrepositoryからdiscoverable\n- Web UIがnormal taskのmandatory dependencyではない\n- canonical plaintext `.env` が存在しない\n- agent\u002Fworker accessが必要最小scope\n- generic CIにproduction secretがない\n- GitHub OIDCが利用可能ならstatic CI credentialより優先\n- secret valueがGit \u002F logs \u002F Issue \u002F PR \u002F checkpointへ残っていない\n- migration時はconsumer切替後にold duplicate storeをreconcile済み\n- deviation時はInfisical採用有無ではなく必要guaranteeを満たしている\n\n","# Secrets Management\n\napplication \u002F serviceのsecret管理を、人間・agent・CI\u002FCDが同じauthority modelで扱えるようにする。\n\ncurrent default providerはInfisicalで、current default control planeはself-hosted `https:\u002F\u002Fsecrets.rebuildup.dev` だが、目的はprovider adoptionそのものではない。守るべき性質は、secret valueのcanonical authority、least privilege、plaintext persistence回避、schema discoverability、recoverability、agent-safe evidenceである。\n\n原則:\n\n> **Secret values live in the secret provider. Secret contracts live in the repository. Access is identity-scoped and injected only where needed.**\n\n## 1. Responsibility boundary\n\nこのSkillが所有する:\n\n- application \u002F service env secretのSoT設計\n- Infisical project \u002F environment \u002F path構成\n- repository-controlled env schemaとの分離\n- local CLI workflow\n- Machine Identity \u002F human identityの責務分離\n- GitHub Actions OIDC integration\n- agent \u002F workerへのsecret capability付与\n- plaintext `.env` \u002F GitHub Secrets \u002F SOPS等からのmigration\n- secret-safe validation \u002F evidence\n- provider unavailable時のdeviation評価\n\nこのSkillが所有しない:\n\n- application固有のcredential発行元でのrotation semantics\n- cloud IAM全体のarchitecture\n- vulnerability hunting全般\n- production secret値そのもののレビュー\n- security\u002Fprivacy risk acceptance\n\n接続先:\n\n- unknown secret-handling vulnerability -> `security-audit`\n- GitHub workflow \u002F delivery -> `github-delivery`\n- worker isolation \u002F credential injection boundary -> `sandbox-runtime`\n- runtime validation -> `quality-gate`\n- provider selection deviation \u002F security-cost decision -> `engineering-decisions`\n- durable recovery -> `agent-recovery`\n\n## 2. Canonical authority split\n\nsecret valueとenvironment contractを同じSoTへ押し込まない。\n\n### Secret value\n\ncurrent application\u002Fservice default:\n\n```text\nInfisical (current default: https:\u002F\u002Fsecrets.rebuildup.dev)\n└─ project\n   ├─ dev\n   ├─ staging\n   └─ prod\n```\n\nInfisical側がcanonical value authorityを持つ。\n\n### Secret contract\n\nrepository側が次をcanonicalに持つ。\n\n- key name\n- required \u002F optional\n- type \u002F shape\n- non-secret default\n- environment applicability\n- owning component\n- validation rule\n- description that does not reveal the value\n\nproject stackに応じてtyped env schema、config schema、`.env.example`、generated metadata等を使用する。\n\n`.env.example`を使う場合はreal secretを入れず、placeholder \u002F empty value \u002F non-secret defaultだけを置く。\n\nfresh agentがInfisicalのsecret valueを読むことなく、必要keyとvalidation contractを理解できる状態を維持する。\n\n## 3. When Infisical is the default\n\n次を満たすapplication \u002F serviceではInfisicalをdefaultとする。\n\n- runtimeがenvironment secretを必要とする\n- developer \u002F CI \u002F deployment等、複数principalからaccessする可能性がある\n- secret valueをGit historyへ置く必要がない\n- online secret providerへ到達できる\n\n次はautomatic adoption対象にしない。\n\n- NixOS \u002F dotfiles \u002F bootstrap等でencrypted secret-in-Gitがexplicit requirement\n- offline-first runtime\n- provider-native storeだけを使う明確なplatform requirement\n- regulation \u002F hosting \u002F network constraintでInfisicalを利用できない\n\ndeviationはprovider名ではなく、同等以上のguaranteeで評価する。\n\n## 4. Initialization \u002F reconciliation\n\n初期化時は作成前にcurrent stateを調査する。\n\n確認:\n\n1. env schema \u002F validation source\n2. `.env` \u002F `.env.*` \u002F secret-like config\n3. `.gitignore`\n4. GitHub Actions secrets \u002F variablesへの依存\n5. existing secret manager \u002F SOPS \u002F cloud secret store\n6. runtime \u002F deploy environment\n7. CI jobs that actually require secret access\n8. developer bootstrap path\n9. repository visibility and agent\u002Fruntime trust boundaries\n\ndesired state:\n\n```text\nrepository\n├─ source\n├─ env schema \u002F non-secret metadata\n├─ provider pointer\u002Fconfig\n│  ├─ site\u002FAPI endpoint\n│  ├─ project ID\n│  └─ environment\u002Fpath mapping\n└─ no canonical plaintext secret\n\nInfisical\n└─ canonical secret values\n\nhuman \u002F agent \u002F CI\n└─ scoped identity\n   └─ runtime injection\n```\n\nidempotentに:\n\n`initialize if missing -> repair if incomplete -> update if stale -> verify if already correct`\n\nを適用する。\n\n## 5. CLI-first human workflow\n\nWeb UIをnormal workflowの必須surfaceにしない。\n\ncurrent default instance:\n\n```text\nsite: https:\u002F\u002Fsecrets.rebuildup.dev\napi:  https:\u002F\u002Fsecrets.rebuildup.dev\u002Fapi\n```\n\n標準bootstrap:\n\n```bash\nexport INFISICAL_API_URL=https:\u002F\u002Fsecrets.rebuildup.dev\u002Fapi\ninfisical login --domain=https:\u002F\u002Fsecrets.rebuildup.dev\ninfisical init\n```\n\nただしtracked project bindingが既に存在するrepositoryでは `infisical init` をfresh setupのたびに再実行しない。existing bindingを検証し、欠落・stale時だけreconcileする。\n\nprovider pointer\u002Fconfigにsecret valueを含めないことを確認し、current defaultで使用するsite\u002FAPI URL、project ID、environment\u002Fpath mapping等のsafe metadataをrepositoryからdiscoverableにする。\n\nwrapper \u002F task \u002F CIはcurrent provider endpointを明示し、Infisical CLIのvendor default endpointへ暗黙fallbackさせない。current default profileでmanaged Cloudへ意図せず接続するのはconfiguration driftとして扱う。\n\n通常実行:\n\n```bash\nINFISICAL_API_URL=https:\u002F\u002Fsecrets.rebuildup.dev\u002Fapi \\\n  infisical run --env=dev --path=\u002Fbackend -- \u003Ccommand>\n```\n\nprojectにstable local command interfaceがある場合は、provider-specific invocationを薄く包んでよい。\n\n例:\n\n```text\nenv:run \u003Ccommand>\nenv:check\nenv:schema\n```\n\nwrapperはsecret valueをprint\u002Fexportせず、underlying provider failureを隠さない。\n\nWeb UIはinspection \u002F emergency administration \u002F onboarding \u002F access review等に使用できるが、agentや通常developer taskの必須stepとして文書化しない。\n\n### Control-plane automation\n\nproject \u002F environment \u002F path \u002F Machine Identity \u002F permission \u002F OIDC trust等も、可能な範囲でheadlessにreconcileできるようにする。\n\n優先順位:\n\n1. Infisical CLIで安全に操作できるsurface\n2. official API\n3. Terraform \u002F OpenTofu等のofficial provider\n4. Web UIはbootstrap \u002F inspection \u002F emergency fallback\n\ncontrol-plane configurationをIaCへ置く場合、repositoryにはproject ID、identity ID、environment\u002Fpath、role\u002Fpolicy等のnon-secret stateだけを置く。secret valueやlong-lived auth credentialをTerraform\u002FOpenTofu stateへpersistさせない。provider capabilityがtime-sensitiveな場合はcurrent official documentationを確認する。\n\nWeb UIでしか行えなかった操作がある場合も、その事実と必要なresultをdurable documentationへ残し、画面操作そのものを唯一のrecoverability sourceにしない。\n\n## 6. Plaintext materialization\n\nruntime injectionを優先する。\n\n平文`.env`やexport fileがtool compatibility上必要な場合だけmaterializeする。\n\n必須条件:\n\n- Git対象外\n- pathが明示的にgitignored\n- lifecycleがtask\u002Fruntimeにbounded\n- file permissionを可能な範囲で絞る\n- logs \u002F Issue \u002F PR \u002F checkpointへvalueを出さない\n- 不要になったcopyを残さない\n\nplain `.env` をcanonical storeやonboarding distribution artifactとして扱わない。\n\n## 7. Agent \u002F worker access\n\nagentへ「Infisicalを使える」ことと「全secretを読める」ことを同義にしない。\n\ndefault:\n\n- Coordinator \u002F reviewer: secret accessなし\n- implementation worker: secret accessなし\n- local integrationで必要なworker: dev\u002Ftestの必要pathだけread\n- deployment worker: target environmentの必要pathだけread\n- secret maintenance actor: explicit write scopeだけ\n\nMachine Identity \u002F temporary identityは最低限次でscopeする。\n\n- project\n- environment\n- path\n- action\n- secret name\u002Ftag when practical\n- lifetime \u002F auth context when supported\n\nSupervisorはhost userのbroad credentialをsandboxへ無条件inheritさせない。\n\nsecret accessが必要なら、そのworker capabilityとして明示的に付与する。\n\n### Forbidden agent behavior\n\n- `env` 等でenvironment全体をdumpする\n- secret list取得を目的なく行う\n- valueをchat \u002F checkpoint \u002F artifactへ転写する\n- debugging目的でsecret valueをlogへ出す\n- broader identityへ切り替えてpermission errorを回避する\n\npermission不足はsecurity boundaryとして扱い、必要scopeを特定してから変更する。\n\n## 8. GitHub Actions\n\nGitHub ActionsからInfisicalへaccessする場合、current platformが対応していればOIDC + Machine Identityをdefaultとする。current default profileではidentity\u002Fcontrol planeを `https:\u002F\u002Fsecrets.rebuildup.dev` 側へ統一する。\n\ndesired trust chain:\n\n```text\nGitHub Actions job\n    ↓ short-lived OIDC token\nInfisical Machine Identity\n    ↓ scoped authorization\nrequired environment\u002Fpath secrets\n```\n\n標準:\n\n- GitHubにlong-lived Infisical master credentialを保存しない\n- workflowは必要なjobだけ `id-token: write`\n- `contents: read` 等、他permissionも最小化\n- OIDC issuer \u002F subject \u002F audience \u002F repository \u002F environment等をcurrent official contractに従ってrestrict\n- generic lint\u002Ftest jobへproduction secretを渡さない\n- production accessはdeployment\u002Frelease boundaryへ限定\n- identity ID \u002F project slug等のnon-secret identifierはsecretとして扱わない\n- OIDCをworkflow source protectionの代替にしない\n- secret-bearing workflowはtrusted branch \u002F protected environment \u002F applicable review boundaryからだけ実行する\n- untrusted PR codeをsecret取得後に実行しない。特に `pull_request_target` 等、base-contextのcredentialとuntrusted head codeを混在させるtriggerは明示的にsecurity reviewする\n\nOIDC非対応runtimeではUniversal Auth等をfallbackとして使用できるが、static credentialは最小scope、rotation可能、long-lived master keyではないものにする。\n\nGitHub Actions \u002F Infisical OIDCのclaim形式やofficial action syntaxはtime-sensitiveである。実装時にcurrent official documentationを確認し、古いexampleをblind copyしない。\n\n## 9. Environment \u002F path model\n\n環境はproject実態へ合わせる。\n\n標準候補:\n\n```text\ndev\nstaging\nprod\n```\n\npathはdeployment\u002Fcomponent boundaryを表現する。\n\n例:\n\n```text\n\u002Fshared\n\u002Fweb\n\u002Fbackend\n\u002Fworker\n\u002Fdeploy\n```\n\nすべてのprojectへ固定pathを強制しない。\n\n同じsecretを無秩序に複製するより、ownershipとconsumer boundaryを明確にする。\n\nprod credentialをdevへcopyして動作確認することを標準化しない。\n\n## 10. Schema and drift verification\n\nsecret valueを取得せずに可能な検証を優先する。\n\n最低限:\n\n- required keyがschemaに定義されている\n- provider上に必要keyが存在する\n- unknown\u002Fstale keyを検出できる\n- environment\u002Fpath mappingがconsumerと一致する\n- required secretがgeneric CIへ露出していない\n- application startup時のenv validationがある場合は実行する\n\nevidenceにはvalueではなく次を使用する。\n\n- key name\n- presence \u002F absence\n- schema validation result\n- environment\u002Fpath\n- identity scope\n- exit code\n- redacted\u002Fhash fingerprint when truly necessary\n\nhashもsmall-domain secretの推測材料になり得るため、必要性がない場合は記録しない。\n\n## 11. Secret mutation\n\nsecretの作成・変更・削除はconsequential external mutationとして扱う。\n\n変更前:\n\n- target project \u002F environment \u002F path \u002F key identityを確認\n- consumerとrollback pathを確認\n- write authorityを確認\n\n変更後:\n\n- valueを表示せずpresence \u002F version \u002F consumer behaviorを検証\n- dependent runtimeをcurrent valueで再検証\n- duplicate old storeが不要なら削除\n- rotationが必要ならcredential issuer側も含めて完了を確認\n\nsecret valueのPR reviewは行わない。review可能なartifactはschema、scope、consumer change、identity policy、validation evidenceである。\n\n## 12. Migration\n\n### Plaintext .env -> Infisical\n\n1. schema\u002Fkeyをrepository側で確定\n2. valuesをInfisicalへ安全にimport\n3. runtimeを`infisical run`等へ切り替え\n4. current runtimeを検証\n5. plaintext fileをcanonical workflowから除去\n6. historical exposureが疑われるvalueはrotate\n\n### GitHub Actions Secrets -> Infisical\n\n1. workflowごとのactual secret dependencyをinventory\n2. Machine Identity scopeを設計\n3. OIDC利用可能ならOIDCへ切り替え\n4. deployment jobでsecret取得を検証\n5. 不要になったGitHub Actions secretを削除\n\n### SOPS -> Infisical\n\napplication envを移す場合:\n\n1. encrypted file内のkey schemaをinventory\n2. valueをInfisicalへ移行\n3. local\u002FCI consumerを切り替え\n4. current runtimeを検証\n5. SOPS file \u002F decryption key dependencyを除去\n\nNix\u002Fdotfiles\u002Fbootstrap等 encrypted-in-Git が目的ならSOPSを無理に移行しない。\n\n## 13. Recovery \u002F provider outage\n\nself-hosted Infisical outageを理由にsecret valueをGitやchatへ退避しない。またavailability問題を理由にmanaged Infisical Cloudへ無断fallbackしてsecond canonical secret storeを作らない。\n\nproject stakesに応じて:\n\n- bounded local token\u002Fsession cache\n- provider-native HA\u002Fself-hosting\n- deployment platform側のruntime secret cache\n- documented emergency path\n\nを設計できる。\n\nemergency copyを作る場合もtemporary authorityとして扱い、復旧後にreconcile\u002Fdeleteする。\n\n## 14. Completion criteria\n\nsecrets managementを完了扱いするには最低限:\n\n- secret valueのcanonical authorityが一意\n- repositoryからrequired env contractをdiscoverできる\n- normal developer flowがCLIで完結\n- current default profileではself-host site\u002FAPI endpointがnon-secret metadataとして明示され、managed Cloudへ暗黙fallbackしない\n- project ID \u002F environment\u002Fpath mapping等のprovider pointerがrepositoryからdiscoverable\n- Web UIがnormal taskのmandatory dependencyではない\n- canonical plaintext `.env` が存在しない\n- agent\u002Fworker accessが必要最小scope\n- generic CIにproduction secretがない\n- GitHub OIDCが利用可能ならstatic CI credentialより優先\n- secret valueがGit \u002F logs \u002F Issue \u002F PR \u002F checkpointへ残っていない\n- migration時はconsumer切替後にold duplicate storeをreconcile済み\n- deviation時はInfisical採用有無ではなく必要guaranteeを満たしている\n\n",{"name":5,"description":7},"main","fae2dd6b4eb2a8c4744ff719f591e6e697efe4a4","skills\u002Fsecrets-management",0,"https:\u002F\u002Fgithub.com\u002Frebuildup\u002Fproject-init","https:\u002F\u002Fgithub.com\u002Frebuildup","https:\u002F\u002Frebuildup.dev","jp 2007\r\nweb制作か映像制作、それにまつわるツールの制作をしている高専生","2026-11-13 16:51:04",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add rebuildup\u002Fproject-init --skill secrets-management",{"tool":39,"command":40},"bunx","bunx skills add rebuildup\u002Fproject-init --skill secrets-management",{"tool":42,"command":43},"pnpm","pnpm dlx skills add rebuildup\u002Fproject-init --skill secrets-management","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Frebuildup\u002Fproject-init\u002Fblob\u002Fmain\u002Fskills\u002Fsecrets-management\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7AB77SBZEANKTQWPK1A9YW5","worktree-workflow","current release-driven profileでWorktrunkをWSL\u002FLinux workspace lifecycle Practiceとして使い、Rust\u002FCargo worktreeのbuild-output isolation・cache reuse・cleanupを含め、同等以上のguaranteeを持つalternativeへのrefinementも判断する時に使用する。","https:\u002F\u002Fgithub.com\u002Frebuildup\u002Fproject-init\u002Fblob\u002Fmain\u002Fskills\u002Fworktree-workflow\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7AB74AK8FAJ98HBC7KK1648","skill-selection","projectの初期化や再整備で、どのAgent Skillを導入するかを決める時に使用する。必要な能力を判定し、project-initの能力一覧と候補記録、さらに外部の探索から候補を評価して、能力ごとに担当を決め、project-localに導入してlockと採否を記録する。","https:\u002F\u002Fgithub.com\u002Frebuildup\u002Fproject-init\u002Fblob\u002Fmain\u002Fskills\u002Fskill-selection\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7AB71CFH8ZKF0QPV5H9QPS0","security-maintenance","framework\u002Fruntime\u002Fdependencyの脆弱性情報を収集し、projectへの実影響と優先度を判定してticket\u002Freleaseへ反映する時に使用する。","https:\u002F\u002Fgithub.com\u002Frebuildup\u002Fproject-init\u002Fblob\u002Fmain\u002Fskills\u002Fsecurity-maintenance\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7AB6YFYS2QF2D1YH4K1117G","security-audit","source codeから未知のsecurity invariant failureを能動的に探索し、coverageを明示しながら独立検証されたfindingへ変換する時に使用する。","https:\u002F\u002Fgithub.com\u002Frebuildup\u002Fproject-init\u002Fblob\u002Fmain\u002Fskills\u002Fsecurity-audit\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7AB6N6WC13K9E0BPAFXWNPH","sandbox-runtime","implementation worker用の独立sandboxを作成・検証し、macOS \u002F WSL\u002FLinux \u002F remote provider差を吸収する時に使用する。","https:\u002F\u002Fgithub.com\u002Frebuildup\u002Fproject-init\u002Fblob\u002Fmain\u002Fskills\u002Fsandbox-runtime\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7AB6GX1Q8VQRA96T0CXF06Z","quality-gate","project固有のstack・framework・runtimeに合わせてquality gateと動作確認レベルを設計・実行・更新する時に使用する。","https:\u002F\u002Fgithub.com\u002Frebuildup\u002Fproject-init\u002Fblob\u002Fmain\u002Fskills\u002Fquality-gate\u002FSKILL.md",[],[]]