Hardens Dockerfiles, Kubernetes manifests, and registries against Singapore Government ICT&SS Container Security controls CS-1..CS-11, including audit prep.
Ships in cybersecurity. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are building or auditing a containerised workload against the 11 Container Security controls (CS-1..CS-11) of the ICT&SS Policy Reform Cybersecurity Control Catalog. The family's scope is securing container building, distribution, and deployment. Almost all of these are configuration in a Dockerfile or an orchestrator manifest, and an audit or VAPT of a container platform checks them.
Control text in this skill and references/cs-controls.md is embedded from
info.standards.tech.gov.sg as of 2026-07-22. The standards iterate actively. For any
compliance-critical decision, verify against the live page:
Machine-readable OSCAL: https://github.com/GovtechSG/tech-standards. Useful for tooling, but it lags the site; the site is authoritative.
references/cs-controls.md — full text of all 11 controls (statement, recommendations,
risk statement, the CS-7 parameter) plus cross-family notes. Read it when you need exact
wording, e.g. for an audit response or SSP documentation.references/platform-recipes.md — concrete Dockerfile, Kubernetes, and CI recipes per
control, open-source-first (Trivy, Grype, Hadolint, Falco, Cosign) with cloud-native
equivalents. Read it when configuring a build or cluster.Every agency system has a System Security Plan (SSP) that selects which controls apply at which level and sets parameter values. One CS control carries an agency-defined parameter, which the catalog leaves blank:
| Control | Parameter | What the SSP defines |
|---|---|---|
| CS-7 | cs-7_prm_1 | The location where container image scanning occurs (e.g. "CI pipeline on push, plus continuous registry scanning") |
Ask for the project's SSP (or the agency ISO/CISO contact) and use its value. Do not invent the scan location; write what the SSP says. If no SSP exists yet, flag that first; the sibling skill sg-gov-ssp-navigator determines which SSP applies and at which level each CS control sits for this system.
Container Security also depends on the Software Supply Chain (SC) family: image signing is SC-7 and signature verification before deploy is SC-8. Both live in the sg-gov-secure-pipeline skill. CS-8 is about registry privacy, not provenance. When a workload needs "signed images verified before they run", that is SC-7/SC-8; point the team at sg-gov-secure-pipeline for it.
Work the container lifecycle in order: build → distribute → run. For setup, apply
each step. For audit, verify each step and record pass / fail / not-applicable-per-SSP
with evidence (the Dockerfile line, the manifest field, the CI run URL, the registry
setting). Recipes for every step are in references/platform-recipes.md.
1a. Minimal base image (CS-2). Build on the smallest viable base (scratch,
distroless, wolfi, alpine, or a -slim variant), using a multi-stage build so
compilers, package managers, and shells never reach the runtime image. Why: every package
in the base is attack surface and a potential CVE; a minimal image has less to exploit and
less to patch.
1b. Unique, digest-pinned base tags (CS-1). Pin FROM by @sha256: digest, never
latest or a floating tag; let Renovate/Dependabot raise reviewed digest bumps. Why:
rolling tags silently change what you build on between builds, introducing untracked
drift and vulnerabilities. (This also satisfies the base-image half of SC-4 pinning.) If
you cannot resolve a digest right now, pin the most specific immutable tag, mark the
digest as a blocking TODO, and report CS-1 as open (not satisfied). A mutable FROM
is never compliant.
1c. Non-root default user (CS-4). Create a dedicated user and set USER <numeric-uid>
in the Dockerfile, with only the permissions the container needs; re-assert it at runtime
with runAsNonRoot: true / runAsUser, allowPrivilegeEscalation: false, and drop all
capabilities. Why: a container running as root that escapes its boundary is root on
concerns beyond itself; least privilege contains the blast radius.
1d. No build-time secrets (CS-3). Never COPY/ARG/ENV a credential into an image;
it persists in a layer (and history) even if later removed. Use BuildKit
--mount=type=secret for build-time needs, and inject runtime secrets via the
orchestrator (K8s Secret files sourced from a vault via CSI/External Secrets; Docker
secrets), never ENV. Why: an image is copied and stored widely, so a secret baked into
it should be treated as leaked. Audit existing images with trivy image --scanners secret.
1e. Lint the Dockerfile (CS-5). Run Hadolint as a required CI check (and ideally
pre-commit), tuning via .hadolint.yaml rather than blanket-ignoring. Why: linting
catches the misconfigurations and anti-patterns (unpinned installs, missing USER,
shell-form pitfalls) that become the vulnerabilities above, before the image is built.
Wire it into the SD-3 required-checks gate (see sg-gov-secure-pipeline).
2a. Scan images in the SSP-named location (CS-7). Scan built images for known
vulnerabilities in cs-7_prm_1 (per the SSP) with Trivy/Grype/Amazon Inspector: enable
scan-on-push at the registry, scan in CI, and block deployment on Critical/High
findings (--ignore-unfixed to stay actionable; suppressions link to an approved risk
acceptance). Scan the digest, not a tag. Why: an image bundles OS packages and app
layers that carry their own CVEs; scanning is the gate that stops known-exploitable images
from shipping, and continuous registry scanning catches CVEs disclosed after push. This
complements SD-5 (which scans declared dependencies); you need both.
2b. Private registry only (CS-8). Host org-built images exclusively in a private registry (ECR private, ACR with public access disabled, GCP Artifact Registry internal, Harbor, private GitLab registry) with anonymous pull off and push scoped by IAM/RBAC. Why: images can contain proprietary code, config, and inadvertently sensitive data; a public registry exposes all of it and invites tampering.
3a. Read-only root filesystem (CS-6). Set readOnlyRootFilesystem: true and mount
explicit writable paths (emptyDir/tmpfs for scratch, volumes for stateful data);
docker run --read-only --tmpfs /tmp for plain Docker. Patch by rebuild + redeploy, never
by editing a running container. Why: an immutable filesystem denies an attacker the
ability to drop tools, tamper with binaries, or persist, and enforces the
immutable-infrastructure model the whole family assumes.
3b. Private orchestrator API (CS-9). The Kubernetes API server (or equivalent) must not be internet-reachable: EKS private/CIDR-restricted endpoint, AKS/GKE private cluster with authorized networks, or a self-managed API server bound to a private interface behind VPN. Why: a publicly exposed control-plane API is a direct path to the whole cluster; restricting reachability removes it from the internet attack surface.
3c. Workload segmentation (CS-10). Isolate workloads with namespaces plus default-deny NetworkPolicies (a namespace without network policy is not isolation), per-namespace RBAC and ResourceQuota; separate node pools or clusters for sensitive tenants. Why: flat clusters let one compromised pod move laterally to everything; segmentation contains an incident to its blast radius.
3d. Runtime protection (CS-11). Deploy a runtime threat-detection tool (Falco, or managed GuardDuty EKS / Defender for Containers / GKE runtime) that detects changes and threats in running containers; on detection, isolate and replace the instance with a rebuilt, patched image, cycling from clean images until a patch exists. Why: builds and scans are point-in-time; runtime protection is the only control that sees a live compromise. This replaces IS-7 (malware) and IS-8 (EDR) for containers; do not also demand a host AV/EDR agent inside the container.
Verify each row; record evidence (Dockerfile line, manifest field, registry/cluster setting, CI run URL). "Param" marks the control whose pass criteria come from the SSP.
| ID | Check | Where | Param |
|---|---|---|---|
| CS-2 | Minimal base (scratch/distroless/wolfi/alpine/-slim); multi-stage; no toolchain in runtime image | Dockerfile | |
| CS-1 | FROM digest-pinned (@sha256:), no rolling tag; reviewed digest bumps | Dockerfile | |
| CS-4 | Non-root USER (numeric UID) in image; runAsNonRoot/no-priv-esc/drop-caps at runtime | Dockerfile + securityContext | |
| CS-3 | No secret via COPY/ARG/ENV; BuildKit secret mounts; runtime injection from vault | Dockerfile + orchestrator | |
| CS-5 | Hadolint runs as a required CI check (and/or pre-commit) | CI config | |
| CS-7 | Image scanning in cs-7_prm_1; scan-on-push; Critical/High blocks deploy; scans the digest | Registry + CI | ✓ |
| CS-8 | Images only in a private registry; anonymous pull off; scoped push | Registry settings | |
| CS-6 | readOnlyRootFilesystem: true with explicit writable mounts; patch by rebuild | securityContext / run flags | |
| CS-9 | Orchestrator API not internet-reachable (private/CIDR-restricted endpoint) | Cluster networking | |
| CS-10 | Namespaces + default-deny NetworkPolicies + per-ns RBAC/quota | Cluster config | |
| CS-11 | Runtime protection deployed (Falco/GuardDuty/Defender); isolate-and-replace on detection | Cluster / cloud console |
Report audit results per control ID with pass / fail / not-applicable-per-SSP, the
evidence found, and for failures the fix from references/platform-recipes.md. Where a
pass depends on the SSP (CS-7 scan location), ask for the SSP value rather than inventing
one.
evals/evals.json (opens in a new tab)evals/files/Dockerfile (opens in a new tab)evals/files/INFRA-SETUP.md (opens in a new tab)evals/files/deployment.yaml (opens in a new tab)evals/trigger-evals.json (opens in a new tab)references/cs-controls.md (opens in a new tab)references/platform-recipes.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
/cybersecurity:sg-gov-container-securityfrom cybersecurity
npx claudepluginhub kyleoliveiro/sg-gov-skills --plugin cybersecurity10 skills in this plugin
/sg-gov-access-controlSet up or audit identity and access management against the Singapore Government's ICT&SS Policy Reform (IM8 successor) Access Control controls (AC-1..AC-16): account inventory and deny-by-default least privilege, MFA for privileged accounts, Singpass/Corppass for public users vs government SSO (WOG AAD) for internal users, inactive/expired account handling, access reviews, automated account lifecycle, static credential rotation, endpoint hardening/MDM, identity- and device-based access, and separation of duties. Use whenever designing IAM policies or roles, authentication flows, admin or privileged access, account provisioning and deprovisioning, credential/API-key management, or when auditing who can access an agency system. Triggers: "access control", IM8/ICT&SS AC controls, least privilege, MFA, Singpass/Corppass login, SSO, dormant/orphaned accounts, access review, credential rotation, endpoint compliance, zero trust on a government project./sg-gov-data-protectionBuild or audit a system's data handling against the Singapore Government's ICT&SS Policy Reform (IM8 successor) Data Protection controls (DP-1..DP-8): Singapore data residency, encryption at rest and in transit, central cloud tenant management, storage sanitisation and witnessed destruction, data loss prevention, and classification disclosure in the UI. Use whenever handling government data classifications, pinning cloud regions or checking cross-region replication, configuring encryption (including the CK key-management work behind it: algorithms, rotation, HSM; pair with sg-gov-secure-coding-as), decommissioning storage, setting up DLP, or when PDPA questions come up on an agency project. Triggers: "data residency", IM8 data protection requirements, DP controls, ap-southeast-1 pinning, encryption at rest / in transit or key management for government data, AWS Organizations / landing zone / GCC tenancy, media sanitisation or disposal, DLP, PDPA or PSGA obligations, maximum classification for input fields./sg-gov-gen-ai-securityBuild or audit a Generative AI feature so it satisfies the Singapore Government's ICT&SS Policy Reform (IM8 successor) Gen-AI SSP overlay: the 8 GA controls (GA-1..GA-8) plus DP-8. Use whenever writing, reviewing, or hardening code that calls a GenAI/LLM API, builds a RAG or agent or chatbot feature, self-hosts open-weights models, or handles user prompts/uploads for a Singapore government agency project, or when preparing for a security audit or VAPT of a GenAI application. Triggers: "ICT&SS Gen-AI requirements", IM8 GenAI controls, GA controls, LLM/chatbot/RAG/agent for a government service, GenAI data classification limits, overseas vs Singapore-hosted GenAI API, GCC 2.0 GenAI API, no-log no-train agreement, safetensors / approved model loaders, open-weights model hosting, GenAI file upload safeguards, LLM output evaluation / safety testing, prompt injection testing, hallucination acknowledgement, GenAI security audit, data classification disclosure for AI inputs./sg-gov-logging-monitoringSet up or audit logging and monitoring against the Singapore Government's ICT&SS Policy Reform (IM8 successor) Logging and Monitoring controls (LM-1..LM-21): capturing the five security log sources, off-box tamper-resistant storage, retention, structured formats and log sanitisation, central security log management (GCSOC), security monitoring and detection, and service-health/SLO/DORA/WOGAA monitoring. Use whenever configuring logs, CloudTrail/VPC Flow Logs/WAF or database logging, GuardDuty-class detection, SIEM or UEBA, log retention or lifecycle policies, alerting, observability, or when auditing an agency system's detection posture. Triggers: "logging requirements", IM8/ICT&SS LM controls, GCSOC, central log management, security monitoring, log retention, log sanitisation, SLOs / golden signals, DORA metrics, web defacement monitoring, WOGAA on a government project./sg-gov-network-securityDesign or audit a system's network boundaries against the Singapore Government's ICT&SS Policy Reform (IM8 successor) Network Security controls (NS-1..NS-11): VPC/VNet segmentation and tiered subnets, access restrictions on CSP resources outside the virtual network, deny-by-default security groups and egress allowlisting, private inter-network connectivity (PrivateLink, peering, Transit Gateway), WAF/DDoS/CDN filtering, valid auto-renewed TLS certificates, authenticated and encrypted service-to-service traffic (mTLS, service mesh), secure cloud-to-on-premises connectivity, IPS/IDS, hardened remote admin access, and firewall-change alerting. Triggers: "network segmentation", security group rules, 0.0.0.0/0 ingress, deny by default, egress allowlist, VPC endpoints, WAF in front of an agency service, certificate expiry, mTLS between microservices, site-to-site VPN / Direct Connect, IDS/IPS, bastion or VPN access to private networks, firewall rule change alerts, IM8 network requirements, GCC network architecture./sg-gov-resiliency-recoveryBuild or audit availability and recoverability for a Singapore government system against the ICT&SS Policy Reform (IM8 successor) Resiliency (RS-1..RS-3) and Backup & Recovery (BR-1..BR-6) controls: multi-AZ deployment with health checks and failover, load balancing and auto-scaling, periodic load testing, backups stored encrypted in a separate location, immutable backup retention (S3 Object Lock), recovery testing against RTO/RPO, and the disaster recovery plan, business continuity plan, and continuity exercises. Use when deploying or reviewing agency infrastructure for high availability, configuring AWS Backup/Azure Backup, setting backup frequency or retention, planning DR failover, or preparing RTO/RPO commitments. Triggers: multi-AZ or availability zones, auto-scaling, load testing, backup policy or schedule, immutable/ ransomware-proof backups, restore or recovery testing, RTO/RPO, disaster recovery plan, business continuity exercise, single point of failure, IM8 resiliency or backup requirements.Other plugins' skills for the same job