[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6D1WFSRP1XSF8X1BTVMNQ4W":3,"skill-same:01M6D1WFSRP1XSF8X1BTVMNQ4W":67},{"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":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":49,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M6D1WFSRP1XSF8X1BTVMNQ4W","devops-security",null,"Securing pipelines and infrastructure: secrets management and rotation, scanning for leaked secrets, the software supply chain (lockfiles, pinned actions, SBOMs, signed images), least-privilege identities, network exposure, TLS everywhere, hardened containers, encrypted backups, audit logs, and incident basics. Read before touching secrets, IAM, CI permissions or anything exposed to the internet.","enowdev\u002Fenowxcli","enowdev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F179420349?v=4","01M6D1MVX2KC0X3Z9NESE7P22K","Enow Dev.","01M6D1MW1FMZGBDKWAJY4GQX81",67,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fdevops-security\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"security","devops security","devops","tls","containers","incident","images","scanning","infrastructure","read","secrets","secrets management","permissions","least-privilege","iam","network","ci","actions","logs","audit","2026-11-10 10:12:30",false,"---\nname: devops-security\ndescription: \"Securing pipelines and infrastructure: secrets management and rotation, scanning for leaked secrets, the software supply chain (lockfiles, pinned actions, SBOMs, signed images), least-privilege identities, network exposure, TLS everywhere, hardened containers, encrypted backups, audit logs, and incident basics. Read before touching secrets, IAM, CI permissions or anything exposed to the internet.\"\n---\n\n# Securing pipelines and infrastructure\n\nThe generated setup keeps an administrator access key in a CI secret and on a\nlaptop, a `.env` with production values committed \"for now\", actions pinned to\ntags anyone with the maintainer's token can move, `npm install` running every\npackage's install script, Postgres and Redis on public IPs behind a firewall\nthat Docker quietly bypasses, SSH open to the world with passwords, and backups\nin the same account an attacker now controls. This is how to keep secrets out\nof reach, the build chain honest, identities narrow and exposure small, and\nwhat to do when something leaks. App-level rules (injection, uploads,\nheaders) are in `backend-security`. One part of devops; the whole is in the\n`devops` skill.\n\n## 1. Secrets\n\n- One app: the platform's secret variables (GitHub environments, Vercel, Fly,\n  Render, Coolify). Several services or people: a manager (AWS Secrets\n  Manager or SSM Parameter Store, Google Secret Manager, Azure Key Vault,\n  Vault or OpenBao, Infisical, Doppler, 1Password with `op run`).\n- Injected at runtime as variables or mounted files; never in an image, the\n  repository, a URL, a log or a report.\n- Scoped per environment: production secrets readable by production\n  workloads and a few people, reached from CI only through protected\n  environments (`devops-ci`).\n- In git only encrypted, and only when they must live there: SOPS with age or\n  KMS, Sealed Secrets for Kubernetes; the decryption key lives elsewhere.\n- `.env` in `.gitignore`; `.env.example` committed with every name, a\n  comment and no real value.\n- Short-lived beats rotated: OIDC tokens for CI, workload identity for\n  services, dynamic database credentials (Vault), RDS-managed passwords\n  (rotated every 7 days by default). What must stay static is rotated on a\n  schedule, when someone leaves, and on any suspicion; accept old and new\n  keys together during a rotation so it needs no downtime.\n\n## 2. Leaks: prevention and response\n\n- Scan before it lands: gitleaks as a pre-commit hook\n  (`gitleaks git --pre-commit --redact --staged`) and over the whole history\n  once (`gitleaks git --redact`); GitHub secret scanning with push protection\n  on for the organisation; `trufflehog git file:\u002F\u002F. --results=verified` to find\n  the ones that still work.\n- When a secret leaks (pushed to any remote, pasted in a ticket, printed in a\n  CI log, shipped in a bundle or an image):\n  1. Revoke or rotate it at once. Bots read public pushes within minutes, and\n     deleting the commit does not unpublish it.\n  2. Check the provider's logs for use since the leak (CloudTrail, the API's\n     key usage, database connections).\n  3. Put the new value everywhere the old one was used and redeploy.\n  4. Then clean history (`git filter-repo --replace-text`, force-push, ask\n     GitHub to purge cached views); forks and clones keep it, which is why\n     step 1 comes first.\n  5. Close the path it took (a hook, a scanner rule, a `.gitignore` line).\n- An agent that finds a secret reports the file, the line and whether it\n  looks live, never the value.\n\n## 3. Supply chain\n\n- Lockfiles committed and installed frozen (`npm ci`,\n  `pnpm install --frozen-lockfile`, `uv sync --locked`,\n  `cargo build --locked`, `go mod verify`).\n- Install scripts run code: pnpm runs dependency lifecycle scripts only for\n  packages you allow (`allowBuilds` since pnpm 11); with npm, consider\n  `--ignore-scripts` in CI and rebuild the few that need it.\n- A minimum release age lets registries pull a compromised version before\n  you install it: pnpm 11 and later default `minimumReleaseAge` to one day;\n  Renovate's `config:best-practices` waits 3 days for npm, and 14 days is\n  sensible where updates merge automatically.\n- Renovate or Dependabot with grouped updates, automerge only for passing\n  minor and patch updates of development tools, weekly lockfile maintenance.\n- Pinned by content, not by name: CI actions by commit SHA (the\n  `tj-actions\u002Fchanged-files` tags in March 2025 and 76 of 77\n  `aquasecurity\u002Ftrivy-action` tags in March 2026 were rewritten to steal CI\n  secrets), downloaded tools by version and checksum (`sha256sum -c`), base\n  images by digest.\n- Scan: `osv-scanner scan source -r .` for dependencies, `trivy image` or\n  `grype` for images, `npm audit signatures` for registry signatures and\n  provenance. Fail CI on fixable high and critical findings; give the rest an\n  owner and a date. Pin the scanners too: Trivy's own release was\n  compromised in the same attack.\n- An SBOM per release (`syft \u003Cimage> -o cyclonedx-json`, or BuildKit's\n  `--sbom=true`) kept with it.\n- Provenance and signatures, keyless from CI (`id-token: write`):\n  `actions\u002Fattest-build-provenance`, checked with\n  `gh attestation verify oci:\u002F\u002Fghcr.io\u002Facme\u002Fshop@sha256:\u003Cdigest> --owner acme`,\n  or cosign:\n\n```sh\ncosign sign --yes ghcr.io\u002Facme\u002Fshop@sha256:\u003Cdigest>\ncosign verify ghcr.io\u002Facme\u002Fshop@sha256:\u003Cdigest> \\\n  --certificate-identity-regexp '^https:\u002F\u002Fgithub.com\u002Facme\u002Fshop\u002F.github\u002Fworkflows\u002Frelease.yml@refs\u002Ftags\u002Fv' \\\n  --certificate-oidc-issuer https:\u002F\u002Ftoken.actions.githubusercontent.com\n```\n\n  A cluster can refuse unsigned images with Kyverno or the Sigstore policy\n  controller.\n- Publish packages through trusted publishing (OIDC) on npm and PyPI, with\n  provenance and 2FA for maintainers. npm revoked all classic tokens in\n  December 2025 and limits write tokens to 90 days.\n- OpenSSF Scorecard (`scorecard --repo=github.com\u002Facme\u002Fshop`) lists the gaps\n  in your own repositories.\n\n## 4. Identities\n\n- People: SSO with MFA everywhere that matters (cloud, GitHub, registrar, DNS,\n  password manager), hardware keys or passkeys for admins, no shared\n  accounts, access reviewed each quarter and removed the day someone leaves.\n- No long-lived cloud keys: IAM Identity Center for people, OIDC roles for\n  CI, task and instance roles or workload identity for services (Google\n  workload identity federation, Azure managed identities). An IAM user with\n  an access key is a finding.\n- Least privilege per service: its own role, named actions on named\n  resources; separate plan (read) and apply (write) roles for IaC;\n  production in its own account or project, with organisation policies as\n  guard rails (no disabling CloudTrail, an allowed-regions list).\n- Break-glass: one or two emergency admin accounts with hardware MFA,\n  credentials sealed away, every use raising an alert.\n- The registrar and DNS accounts are as critical as the cloud root: MFA and a\n  registrar lock.\n\n## 5. Network exposure\n\n- Closed by default: databases, caches, queues, admin interfaces and internal\n  services on private networks; the public surface is the proxy or load\n  balancer on 80 and 443 (UDP 443 too for HTTP\u002F3).\n- Firewalls and security groups name ports and sources; `0.0.0.0\u002F0` only on\n  80 and 443.\n- Docker publishes ports through its own firewall rules, ahead of ufw and\n  firewalld: `-p 5432:5432` is reachable from the internet even when ufw\n  denies 5432. Publish to `127.0.0.1`, use internal networks without\n  published ports, or filter in the `DOCKER-USER` chain.\n- Never on the internet: the Docker socket or API (2375, 2376: root on the\n  host), Redis, MongoDB, Elasticsearch, Postgres, and dashboards (Grafana,\n  Portainer, pgAdmin, Coolify, Kubernetes) without SSO. Put admin surfaces\n  behind Tailscale, Cloudflare Access or a cloud identity-aware proxy.\n- SSH keys only, no root login, or no SSH at all (SSM Session Manager,\n  Tailscale SSH):\n\n```text\n# \u002Fetc\u002Fssh\u002Fsshd_config.d\u002F10-hardening.conf\nPasswordAuthentication no\nKbdInteractiveAuthentication no\nPermitRootLogin no\nAllowUsers deploy\nMaxAuthTries 3\n```\n\n  Run `sshd -t`, reload, and keep a second session open until a new login\n  works. fail2ban or CrowdSec for what stays exposed; automatic security\n  updates (`unattended-upgrades`) on every host.\n- At the edge: WAF rules and rate limits on sign-in, APIs and expensive\n  endpoints, and the origin locked to the CDN (its IP ranges, authenticated\n  origin pulls, or a tunnel) so nobody goes around it (`devops-networking`).\n- Hosts that need no internet get no egress; sensitive ones get an allow-list.\n\n## 6. In transit, in containers, at rest\n\n- HTTPS everywhere with HSTS, automatic renewal and expiry alerts, TLS 1.2 at\n  least (`devops-networking`). Database connections verify the server\n  (`sslmode=verify-full` with the provider's CA; `require` encrypts but\n  trusts anyone). mTLS through a mesh or Tailscale where the network is not\n  trusted.\n- Containers non-root with a read-only root filesystem, all capabilities\n  dropped, no privilege escalation, the runtime's default seccomp; no\n  `privileged`, host network or host path mounts; the Docker socket only in a\n  trusted proxy that needs it, read-only or behind a socket proxy\n  (`devops-containers`, `devops-kubernetes`).\n- Disks, buckets, databases and snapshots encrypted with managed keys;\n  buckets private with public access blocked at the account level.\n\n## 7. Backups\n\n- 3-2-1: three copies, two kinds of storage, one off-site in another account\n  or provider; encrypted (restic, pgBackRest, WAL-G); immutable (S3 Object\n  Lock, an append-only restic repository), so production credentials cannot\n  delete them.\n- Backup credentials can write but not delete, and are not the production\n  credentials.\n- Restores tested monthly for the main database, timed and written down; an\n  untested backup is a hope. Retention follows the law and the business\n  (daily for 30 days, monthly for a year is common); personal data in backups\n  ages out too.\n\n## 8. Audit logs\n\n- The cloud control plane: an organisation-wide CloudTrail in every region,\n  delivered to a separate log account with file validation; Google Cloud's\n  Admin Activity logs are always on, Data Access logs are off until enabled;\n  Azure's Activity Log keeps 90 days unless exported.\n- Also the GitHub organisation audit log, Kubernetes audit logs, database\n  logins and DDL, the secret manager's access log and SSO sign-ins.\n- Kept a year or more where compliance asks, out of reach of the people\n  audited, with alerts on rare events: root sign-in, MFA removed, a new admin,\n  logging stopped, a secret read by an unusual identity.\n\n## 9. Incidents\n\n1. Declare it: one incident lead, one channel, a timeline from the start.\n2. Contain: revoke keys, block the account or address, isolate the host\n   (snapshot it for forensics before rebuilding), take the feature offline.\n3. Eradicate and recover: patch, rotate everything the attacker could reach,\n   restore from clean backups, watch for a return.\n4. Communicate honestly on the status page and to customers. Regulators run\n   on a clock: under GDPR, 72 hours to the supervisory authority once aware\n   of a personal data breach; under Indonesia's UU PDP, written notice within\n   3 x 24 hours to the people affected and the authority.\n5. A blameless post-mortem within a week: timeline, impact, contributing\n   causes, actions with owners and dates.\n\n## Check it\n\n- `gitleaks git --redact` and `trufflehog git file:\u002F\u002F. --results=verified`: no\n  live secrets anywhere in history.\n- `osv-scanner scan source -r .`, a pinned `trivy image --severity\n  HIGH,CRITICAL \u003Cimage>`, `pinact run --check`, `uvx zizmor .github\u002Fworkflows`.\n- On a host you are responsible for, from outside:\n  `nmap -Pn --top-ports 1000 \u003Cpublic-ip>` shows only the ports you meant; on\n  the host, `ss -tlnp` shows internal services bound to `127.0.0.1` or\n  private addresses.\n- `aws iam list-users` and `aws iam list-access-keys --user-name \u003Cuser>`: no\n  active keys for people or apps; `kubectl auth can-i --list` for CI\n  identities.\n- The last restore test is recorded with its date, duration and result.\n\n## Avoid\n\nLong-lived cloud keys in CI or on laptops; secrets in git, images, logs or\nreports; deleting a leaked secret's commit instead of rotating it first;\nactions and base images pinned by tag; install scripts from every package;\nbrand-new releases installed within hours; scanners left unpinned; databases,\ncaches, the Docker API or admin panels on the internet; trusting ufw with\npublished Docker ports; SSH with passwords or root login; backups the\nproduction account can delete, or never restored; audit logs off or in reach\nof the people they audit; an incident with no lead and no timeline.\n","# Securing pipelines and infrastructure\n\nThe generated setup keeps an administrator access key in a CI secret and on a\nlaptop, a `.env` with production values committed \"for now\", actions pinned to\ntags anyone with the maintainer's token can move, `npm install` running every\npackage's install script, Postgres and Redis on public IPs behind a firewall\nthat Docker quietly bypasses, SSH open to the world with passwords, and backups\nin the same account an attacker now controls. This is how to keep secrets out\nof reach, the build chain honest, identities narrow and exposure small, and\nwhat to do when something leaks. App-level rules (injection, uploads,\nheaders) are in `backend-security`. One part of devops; the whole is in the\n`devops` skill.\n\n## 1. Secrets\n\n- One app: the platform's secret variables (GitHub environments, Vercel, Fly,\n  Render, Coolify). Several services or people: a manager (AWS Secrets\n  Manager or SSM Parameter Store, Google Secret Manager, Azure Key Vault,\n  Vault or OpenBao, Infisical, Doppler, 1Password with `op run`).\n- Injected at runtime as variables or mounted files; never in an image, the\n  repository, a URL, a log or a report.\n- Scoped per environment: production secrets readable by production\n  workloads and a few people, reached from CI only through protected\n  environments (`devops-ci`).\n- In git only encrypted, and only when they must live there: SOPS with age or\n  KMS, Sealed Secrets for Kubernetes; the decryption key lives elsewhere.\n- `.env` in `.gitignore`; `.env.example` committed with every name, a\n  comment and no real value.\n- Short-lived beats rotated: OIDC tokens for CI, workload identity for\n  services, dynamic database credentials (Vault), RDS-managed passwords\n  (rotated every 7 days by default). What must stay static is rotated on a\n  schedule, when someone leaves, and on any suspicion; accept old and new\n  keys together during a rotation so it needs no downtime.\n\n## 2. Leaks: prevention and response\n\n- Scan before it lands: gitleaks as a pre-commit hook\n  (`gitleaks git --pre-commit --redact --staged`) and over the whole history\n  once (`gitleaks git --redact`); GitHub secret scanning with push protection\n  on for the organisation; `trufflehog git file:\u002F\u002F. --results=verified` to find\n  the ones that still work.\n- When a secret leaks (pushed to any remote, pasted in a ticket, printed in a\n  CI log, shipped in a bundle or an image):\n  1. Revoke or rotate it at once. Bots read public pushes within minutes, and\n     deleting the commit does not unpublish it.\n  2. Check the provider's logs for use since the leak (CloudTrail, the API's\n     key usage, database connections).\n  3. Put the new value everywhere the old one was used and redeploy.\n  4. Then clean history (`git filter-repo --replace-text`, force-push, ask\n     GitHub to purge cached views); forks and clones keep it, which is why\n     step 1 comes first.\n  5. Close the path it took (a hook, a scanner rule, a `.gitignore` line).\n- An agent that finds a secret reports the file, the line and whether it\n  looks live, never the value.\n\n## 3. Supply chain\n\n- Lockfiles committed and installed frozen (`npm ci`,\n  `pnpm install --frozen-lockfile`, `uv sync --locked`,\n  `cargo build --locked`, `go mod verify`).\n- Install scripts run code: pnpm runs dependency lifecycle scripts only for\n  packages you allow (`allowBuilds` since pnpm 11); with npm, consider\n  `--ignore-scripts` in CI and rebuild the few that need it.\n- A minimum release age lets registries pull a compromised version before\n  you install it: pnpm 11 and later default `minimumReleaseAge` to one day;\n  Renovate's `config:best-practices` waits 3 days for npm, and 14 days is\n  sensible where updates merge automatically.\n- Renovate or Dependabot with grouped updates, automerge only for passing\n  minor and patch updates of development tools, weekly lockfile maintenance.\n- Pinned by content, not by name: CI actions by commit SHA (the\n  `tj-actions\u002Fchanged-files` tags in March 2025 and 76 of 77\n  `aquasecurity\u002Ftrivy-action` tags in March 2026 were rewritten to steal CI\n  secrets), downloaded tools by version and checksum (`sha256sum -c`), base\n  images by digest.\n- Scan: `osv-scanner scan source -r .` for dependencies, `trivy image` or\n  `grype` for images, `npm audit signatures` for registry signatures and\n  provenance. Fail CI on fixable high and critical findings; give the rest an\n  owner and a date. Pin the scanners too: Trivy's own release was\n  compromised in the same attack.\n- An SBOM per release (`syft \u003Cimage> -o cyclonedx-json`, or BuildKit's\n  `--sbom=true`) kept with it.\n- Provenance and signatures, keyless from CI (`id-token: write`):\n  `actions\u002Fattest-build-provenance`, checked with\n  `gh attestation verify oci:\u002F\u002Fghcr.io\u002Facme\u002Fshop@sha256:\u003Cdigest> --owner acme`,\n  or cosign:\n\n```sh\ncosign sign --yes ghcr.io\u002Facme\u002Fshop@sha256:\u003Cdigest>\ncosign verify ghcr.io\u002Facme\u002Fshop@sha256:\u003Cdigest> \\\n  --certificate-identity-regexp '^https:\u002F\u002Fgithub.com\u002Facme\u002Fshop\u002F.github\u002Fworkflows\u002Frelease.yml@refs\u002Ftags\u002Fv' \\\n  --certificate-oidc-issuer https:\u002F\u002Ftoken.actions.githubusercontent.com\n```\n\n  A cluster can refuse unsigned images with Kyverno or the Sigstore policy\n  controller.\n- Publish packages through trusted publishing (OIDC) on npm and PyPI, with\n  provenance and 2FA for maintainers. npm revoked all classic tokens in\n  December 2025 and limits write tokens to 90 days.\n- OpenSSF Scorecard (`scorecard --repo=github.com\u002Facme\u002Fshop`) lists the gaps\n  in your own repositories.\n\n## 4. Identities\n\n- People: SSO with MFA everywhere that matters (cloud, GitHub, registrar, DNS,\n  password manager), hardware keys or passkeys for admins, no shared\n  accounts, access reviewed each quarter and removed the day someone leaves.\n- No long-lived cloud keys: IAM Identity Center for people, OIDC roles for\n  CI, task and instance roles or workload identity for services (Google\n  workload identity federation, Azure managed identities). An IAM user with\n  an access key is a finding.\n- Least privilege per service: its own role, named actions on named\n  resources; separate plan (read) and apply (write) roles for IaC;\n  production in its own account or project, with organisation policies as\n  guard rails (no disabling CloudTrail, an allowed-regions list).\n- Break-glass: one or two emergency admin accounts with hardware MFA,\n  credentials sealed away, every use raising an alert.\n- The registrar and DNS accounts are as critical as the cloud root: MFA and a\n  registrar lock.\n\n## 5. Network exposure\n\n- Closed by default: databases, caches, queues, admin interfaces and internal\n  services on private networks; the public surface is the proxy or load\n  balancer on 80 and 443 (UDP 443 too for HTTP\u002F3).\n- Firewalls and security groups name ports and sources; `0.0.0.0\u002F0` only on\n  80 and 443.\n- Docker publishes ports through its own firewall rules, ahead of ufw and\n  firewalld: `-p 5432:5432` is reachable from the internet even when ufw\n  denies 5432. Publish to `127.0.0.1`, use internal networks without\n  published ports, or filter in the `DOCKER-USER` chain.\n- Never on the internet: the Docker socket or API (2375, 2376: root on the\n  host), Redis, MongoDB, Elasticsearch, Postgres, and dashboards (Grafana,\n  Portainer, pgAdmin, Coolify, Kubernetes) without SSO. Put admin surfaces\n  behind Tailscale, Cloudflare Access or a cloud identity-aware proxy.\n- SSH keys only, no root login, or no SSH at all (SSM Session Manager,\n  Tailscale SSH):\n\n```text\n# \u002Fetc\u002Fssh\u002Fsshd_config.d\u002F10-hardening.conf\nPasswordAuthentication no\nKbdInteractiveAuthentication no\nPermitRootLogin no\nAllowUsers deploy\nMaxAuthTries 3\n```\n\n  Run `sshd -t`, reload, and keep a second session open until a new login\n  works. fail2ban or CrowdSec for what stays exposed; automatic security\n  updates (`unattended-upgrades`) on every host.\n- At the edge: WAF rules and rate limits on sign-in, APIs and expensive\n  endpoints, and the origin locked to the CDN (its IP ranges, authenticated\n  origin pulls, or a tunnel) so nobody goes around it (`devops-networking`).\n- Hosts that need no internet get no egress; sensitive ones get an allow-list.\n\n## 6. In transit, in containers, at rest\n\n- HTTPS everywhere with HSTS, automatic renewal and expiry alerts, TLS 1.2 at\n  least (`devops-networking`). Database connections verify the server\n  (`sslmode=verify-full` with the provider's CA; `require` encrypts but\n  trusts anyone). mTLS through a mesh or Tailscale where the network is not\n  trusted.\n- Containers non-root with a read-only root filesystem, all capabilities\n  dropped, no privilege escalation, the runtime's default seccomp; no\n  `privileged`, host network or host path mounts; the Docker socket only in a\n  trusted proxy that needs it, read-only or behind a socket proxy\n  (`devops-containers`, `devops-kubernetes`).\n- Disks, buckets, databases and snapshots encrypted with managed keys;\n  buckets private with public access blocked at the account level.\n\n## 7. Backups\n\n- 3-2-1: three copies, two kinds of storage, one off-site in another account\n  or provider; encrypted (restic, pgBackRest, WAL-G); immutable (S3 Object\n  Lock, an append-only restic repository), so production credentials cannot\n  delete them.\n- Backup credentials can write but not delete, and are not the production\n  credentials.\n- Restores tested monthly for the main database, timed and written down; an\n  untested backup is a hope. Retention follows the law and the business\n  (daily for 30 days, monthly for a year is common); personal data in backups\n  ages out too.\n\n## 8. Audit logs\n\n- The cloud control plane: an organisation-wide CloudTrail in every region,\n  delivered to a separate log account with file validation; Google Cloud's\n  Admin Activity logs are always on, Data Access logs are off until enabled;\n  Azure's Activity Log keeps 90 days unless exported.\n- Also the GitHub organisation audit log, Kubernetes audit logs, database\n  logins and DDL, the secret manager's access log and SSO sign-ins.\n- Kept a year or more where compliance asks, out of reach of the people\n  audited, with alerts on rare events: root sign-in, MFA removed, a new admin,\n  logging stopped, a secret read by an unusual identity.\n\n## 9. Incidents\n\n1. Declare it: one incident lead, one channel, a timeline from the start.\n2. Contain: revoke keys, block the account or address, isolate the host\n   (snapshot it for forensics before rebuilding), take the feature offline.\n3. Eradicate and recover: patch, rotate everything the attacker could reach,\n   restore from clean backups, watch for a return.\n4. Communicate honestly on the status page and to customers. Regulators run\n   on a clock: under GDPR, 72 hours to the supervisory authority once aware\n   of a personal data breach; under Indonesia's UU PDP, written notice within\n   3 x 24 hours to the people affected and the authority.\n5. A blameless post-mortem within a week: timeline, impact, contributing\n   causes, actions with owners and dates.\n\n## Check it\n\n- `gitleaks git --redact` and `trufflehog git file:\u002F\u002F. --results=verified`: no\n  live secrets anywhere in history.\n- `osv-scanner scan source -r .`, a pinned `trivy image --severity\n  HIGH,CRITICAL \u003Cimage>`, `pinact run --check`, `uvx zizmor .github\u002Fworkflows`.\n- On a host you are responsible for, from outside:\n  `nmap -Pn --top-ports 1000 \u003Cpublic-ip>` shows only the ports you meant; on\n  the host, `ss -tlnp` shows internal services bound to `127.0.0.1` or\n  private addresses.\n- `aws iam list-users` and `aws iam list-access-keys --user-name \u003Cuser>`: no\n  active keys for people or apps; `kubectl auth can-i --list` for CI\n  identities.\n- The last restore test is recorded with its date, duration and result.\n\n## Avoid\n\nLong-lived cloud keys in CI or on laptops; secrets in git, images, logs or\nreports; deleting a leaked secret's commit instead of rotating it first;\nactions and base images pinned by tag; install scripts from every package;\nbrand-new releases installed within hours; scanners left unpinned; databases,\ncaches, the Docker API or admin panels on the internet; trusting ufw with\npublished Docker ports; SSH with passwords or root login; backups the\nproduction account can delete, or never restored; audit logs off or in reach\nof the people they audit; an incident with no lead and no timeline.\n",{"name":5,"description":7},"main","38293fe1b096e6bf3646c7344c38786ed688f464","crates\u002Fenowx-core\u002Fskills\u002Fdevops-security",21,"https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli","https:\u002F\u002Fenowx.ai","https:\u002F\u002Fgithub.com\u002Fenowdev","Pretending to be a Developer","2026-10-06 02:05:35",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add enowdev\u002Fenowxcli --skill devops-security",{"tool":59,"command":60},"bunx","bunx skills add enowdev\u002Fenowxcli --skill devops-security",{"tool":62,"command":63},"pnpm","pnpm dlx skills add enowdev\u002Fenowxcli --skill devops-security","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fdevops-security\u002FSKILL.md",true,[],[68,79,96,109,130,149],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":39},"01M6D2HQYSQD9N7MTNDT4A7CBM","demo-skill","Project-scope demo skill for tests.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fworkspace\u002F.agents\u002Fskills\u002Fdemo-skill\u002FSKILL.md",[],[75,76,77,78,28],"demo skill","demo","tests","project",{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":39},"01M6D2HM0GCPM0TM2HPG9HHR2R","writing","Writing words people read: the specific thing instead of claims, words to drop, sentences, interface copy (buttons, labels, errors, empty states, confirmations), page copy, notifications and emails, alt text and link text, numbers and dates, words that translate well, documentation and voice. Read before writing a page's copy, an interface's text or a document.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fwriting\u002FSKILL.md",[],[81,86,87,88,89,90,28,91,92,93,94,95],"text","emails","empty","drop","document","page","voice","notifications","documentation","translate",{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":39},"01M6D2HG07YS49NM196Q0R3AZ8","ui","Designing or restyling an interface: direction, layout, type, colour, icons, components, states, responsive behaviour. Read before building a page, a screen or a set of components.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fui\u002FSKILL.md",[],[98,103,104,105,106,91,107,28,108],"icons","components","SET","responsive","layout","before building",{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":39},"01M6D2HB59HZHWG1RYZDV4SJ91","ui-themes","Light and dark themes, and colour that holds in both: tokens with a value per theme, and what each kind of content needs to stay visible (icons, SVG drawings and line art, logos, photos, screenshots, charts, code, maps, borders, shadows, focus, form controls), switching without a flash, and checking both. Read before building a second theme or a theme toggle, and before any drawing, logo or chart on a page that has two themes.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fui-themes\u002FSKILL.md",[],[98,116,117,118,119,120,121,122,123,28,108,124,91,125,126,127,103,128,129],"ui themes","switching","photos","tokens","drawing","focus","maps","Art","flash","code","Charts","content","screenshots","logo",{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":39},"01M6D2H5R5KRAE524C8QX0T7Q0","ui-structure","Structure before styling: the blueprint written before any interface code (the screen's job, the regions its kind of page needs, their order and why, the layout skeleton in numbers, the components and their states), the anatomy and order of a homepage, a dashboard, a list, a detail page, settings, a form, sign-in, pricing, docs, an article and a checkout, and how to turn the blueprint into code (tokens, layout primitives, components, sections, page). Read first, before building or rebuilding any page or screen.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fui-structure\u002FSKILL.md",[],[137,98,138,104,139,140,125,141,142,143,107,119,144,145,146,28,108,91,147,148],"structure","ui structure","pricing","dashboard","Blueprint","article","anatomy","styling","primitives","list","why","how",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":155,"publishedAt":39},"01M6D2H0ZZBJG77MBGPZHA6MWD","ui-stack-vue","Building interfaces in Vue 3 and Nuxt: project layout, script setup with typed defineProps, defineEmits and defineModel, attribute fallthrough, slots and scoped slots, template refs, ref, reactive and computed, watch versus watchEffect, composables and VueUse, provide and inject, Pinia, keyed v-for, transitions, Nuxt 4 (app directory, pages, layouts, useFetch and useAsyncData keys, $fetch in handlers, server routes, runtime config, useSeoMeta, NuxtImg, middleware), VeeValidate forms, Reka UI and Nuxt UI, testing, vue-tsc, and the traps. Read when the project uses Vue or Nuxt.","https:\u002F\u002Fgithub.com\u002Fenowdev\u002Fenowxcli\u002Fblob\u002Fmain\u002Fcrates\u002Fenowx-core\u002Fskills\u002Fui-stack-vue\u002FSKILL.md",[],[98,156,157,158,159,160,161,162,107,78,163,164,28,165,166,167,168,169,170,171],"vue","stack","ui stack vue","forms","pages","watch","runtime","transitions","fetch","pinia","nuxt","template","server","config","directory","testing"]