Maps Singapore Government ICT&SS Application Security (AS) and Cryptography (CK) controls to code, for writing, reviewing, or auditing agency systems.
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.
The ICT&SS Policy Reform (IM8's successor) Cybersecurity Control Catalog contains 15 Application Security (AS) controls and 4 Cryptography/Key Management (CK) controls that land directly in application code. This skill maps them to coding decisions so an agent writing or reviewing code produces compliant output the first time, with control IDs the agency's security team can trace to its System Security Plan (SSP).
Use this skill in three modes:
Control text in this skill and in references/as-controls.md is embedded from info.standards.tech.gov.sg as of 2026-07-16. The standards iterate actively. For compliance-critical decisions (SSP evidence, audit responses, deviations), verify against the live pages:
Machine-readable OSCAL: https://github.com/GovtechSG/tech-standards is useful for tooling but lags the site; the site is authoritative.
as-5_prm_1/2/3 (password length, policy, type),
as-11_prm_1/2 (session hours, session type), ck-2_prm_1 (key rotation days) have
no catalog values. Never invent them. Ask the user for the project's SSP parameter
values, or locate them in the repo (SSP document, security config, compliance docs).
If unavailable, implement against a named configuration constant, flag it as
TODO(SSP): confirm as-5_prm_1, and say so in your report.Full statement/recommendation/risk text for every control: references/as-controls.md. The sections below are the working summary.
AS-1 — Input Validation. Validate all application inputs against expected type, structure, or format. Why: unvalidated input invites injection, data manipulation, and crashes that can lead to unauthorised access or service disruption.
if checks scattered through handlers.AS-2 — Parameterised Interfaces. Use parameterised interfaces for database queries and system commands. Why: string-built queries are the direct path to SQL/command injection and system compromise.
execFile, subprocess.run
with a list, ProcessBuilder), never shell=True / backtick interpolation.AS-3 — Output Sanitisation. Sanitise all application outputs used to render an HTML document. Why: unsanitised output enables XSS, with malicious code executing in users' browsers.
dangerouslySetInnerHTML, | safe,
v-html, innerHTML) as a finding unless the value passes an HTML sanitiser
(e.g. DOMPurify) with a tight allowlist.AS-4 — Authentication Mechanism Rate-Limiting. Rate-limit all authentication mechanisms. Why: without it, weak credentials fall to brute force.
AS-5 — Password Requirements. Where SSO or passwordless is not supported, enforce
the SSP-defined minimum length (as-5_prm_1), policy (as-5_prm_2), and password type
(as-5_prm_3). Why: short or common passwords are the easiest route to account takeover.
as-5_prm_2 says otherwise.AS-6 — Password Salting and Hashing. Store passwords as salted hashes using an offline-attack-resistant scheme per NIST SP 800-63B; salts must be (a) generated by a cryptographically secure PRNG, (b) at least 32 bits, (c) unique per account. Why: on breach, unsalted or weakly hashed passwords are trivially extracted.
crypto.randomBytes not Math.random
(Node.js); java.security.SecureRandom.nextBytes not java.util.Random (Java).
Python: secrets, not random.AS-7 — Access Control Check Enforcement. Perform access control checks on all authenticated requests. Why: authenticated-but-unauthorised access is how data breaches and IDOR happen.
WHERE owner_id = :current_user), not
just role at login. Re-check on state-changing requests; never trust hidden fields or
client-supplied IDs as authorisation.AS-11 — Session Management. Require the SSP-defined session type (as-11_prm_2) to
re-authenticate after the session exceeds as-11_prm_1 hour(s), or terminate the
session. Why: stale sessions let whoever holds them act as the user indefinitely.
as-11_prm_1. Get the parameter from the SSP.AS-15 — Password Change. Force a password change on suspected account compromise. Why: without it, an attacker with a stolen credential keeps access indefinitely.
must_change_password / credential-invalidation flag that
blocks all authenticated activity except the change flow, plus session revocation.AS-8 — Secrets Management. Store secrets in a proper secrets management solution with access control, encryption, and monitoring. Why: hard-coded or plaintext secrets in code or config are standing credentials for anyone who reads the repo.
.env files.AS-14 — Secure Cryptographic Libraries. Use reputable, secure cryptographic libraries and functions for all cryptographic operations. Why: home-grown or obsolete crypto can fail silently and expose data.
libsodium, language-standard crypto modules); prefer FIPS 140-2/140-3 validated
modules where assurance matters. Keep libraries updated.CK-1 — Cryptographic Key Establishment. Use industry-standard key establishment and key derivation (NIST SP 800-56A/B/C). Why: weak establishment = weak or broken encryption. In code: use your KMS or library's standard ECDH/RSA-KEM + HKDF flows; never derive keys from passwords without a proper KDF.
CK-2 — Cryptographic Key Rotation. Rotate keys every ck-2_prm_1 days (SSP-defined;
do not invent). Why: long-lived keys raise breakage risk. Enable automatic rotation in
KMS (AWS KMS, Azure Key Vault) and design code to be key-version-aware (encrypt with
current, decrypt with any active version).
CK-3 — Cryptographic Key Management. Manage keys across their full lifecycle (generation → storage → distribution → use → rotation → backup → revocation → destruction) per NIST SP 800-57 / ISO/IEC 27017. Why: poorly managed keys mean unauthorised access and compromised crypto. Mostly process, but code must not undermine it: no keys in code, logs, or error messages; support revocation without redeploy.
CK-4 — Cryptographic Key Storage. Store keys securely with least-privilege access control. Why: readable keys = readable data. Keep keys in KMS/HSM-backed storage; scope IAM so the app can use keys (encrypt/decrypt/sign) but not export them.
AS-9 — Content Security Policy. Set minimally permissive CSP response headers. Why: CSP is the browser-side backstop against XSS when AS-3 sanitisation slips.
default-src, script-src, style-src,
connect-src, img-src, media-src, object-src), starting from
default-src 'self'; object-src 'none' and loosening only with justification.script-src 'unsafe-inline'/'unsafe-eval' and
bare wildcards; use nonces or hashes for inline scripts. Reference: OWASP Secure
Headers Project Best Practices.AS-10 — HSTS. Set Strict-Transport-Security with max-age ≥ 31536000 (1 year).
Why: shorter or missing HSTS leaves users open to protocol downgrade attacks.
Strict-Transport-Security: max-age=31536000; includeSubDomains (add preload when
the domain is ready). The ≥ 31536000 floor is in the control statement; flag
any lower value in review.AS-12 — Malware Scanning of Uploaded Files. Scan uploads for malware before the system processes them further. Why: unscanned files infect downstream consumers.
AS-13 — Exposure of Internal System Details. Never disclose internal system details to public users. Why: stack traces, debug info, and version strings hand attackers a map of what to exploit.
DEBUG=False, no dev error pages);
strip Server/X-Powered-By headers; keep API error bodies free of SQL fragments,
file paths, and dependency versions.For diff review, check each row against every changed file; for audits, sweep the
codebase per row. Cite findings as [AS-n]/[CK-n] with file:line.
| ID | Check | Look for |
|---|---|---|
| AS-1 | All inputs schema-validated at trust boundary | new/changed endpoints, parsers, queue consumers without validation |
| AS-2 | Queries/commands parameterised | string-built SQL/shell/NoSQL, shell=True, template interpolation into queries |
| AS-3 | HTML-bound output escaped/sanitised | dangerouslySetInnerHTML, innerHTML, | safe, disabled autoescape |
| AS-4 | Auth endpoints rate-limited | signup/login/reset/OTP/token routes without limiter or lockout/delay |
| AS-5 | Password rules = SSP params (as-5_prm_1/2/3) | hard-coded lengths that don't match SSP; missing common-password screen |
| AS-6 | Salted hash, memory-hard KDF, CSPRNG, ≥32-bit unique salt | MD5/SHA-x passwords, Math.random/java.util.Random, shared or absent salt |
| AS-7 | AuthZ check on every authenticated request | new routes outside guard middleware; missing object-ownership checks (IDOR) |
| AS-8 | Secrets from a secrets manager, never in code/config | hard-coded keys, committed .env, plaintext config credentials, CI variables holding secrets |
| AS-9 | CSP present and minimally permissive | missing CSP; unsafe-inline/unsafe-eval/* in script-src |
| AS-10 | HSTS max-age ≥ 31536000 | missing header; max-age below one year |
| AS-11 | Server-side absolute session timeout = as-11_prm_1 h | cookie-only expiry, non-expiring JWTs, no re-auth on privilege change |
| AS-12 | Uploads malware-scanned before any processing | handlers touching file content pre-scan; no quarantine path |
| AS-13 | No internal details in public errors | stack traces/debug pages in prod, verbose API errors, version headers |
| AS-14 | Reputable crypto libraries only | hand-rolled crypto, MD5/SHA-1/DES/ECB, abandoned crypto deps |
| AS-15 | Forced password change on suspected compromise | no invalidation flag/flow, sessions survive compromise response |
| CK-1 | Standard key establishment/derivation (SP 800-56) | ad-hoc key exchange, password-derived keys without KDF |
| CK-2 | Keys rotate every ck-2_prm_1 days | static keys, rotation disabled in KMS, key-version-blind code |
| CK-3 | Keys managed across lifecycle, revocable | keys in code/logs, revocation requires redeploy |
| CK-4 | Keys in KMS/HSM with least-privilege access | exportable keys, broad IAM on key use, keys on disk |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
secure-coding, im8, ict-ss, application-security, compliance
10 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-container-securityBuild, scan, distribute, and run containers that satisfy the Singapore Government's ICT&SS Policy Reform (IM8 successor) Container Security (CS-1..CS-11) controls. Use whenever writing or reviewing a Dockerfile, a Kubernetes manifest or Helm chart, a container build pipeline, or registry/runtime configuration for a Singapore government agency project, or when preparing for a security audit or VAPT of a containerised workload. Triggers: "ICT&SS container requirements", IM8 container security, Dockerfile hardening, minimal/distroless/alpine/scratch base image, digest-pinned FROM, non-root container user, read-only root filesystem, runtime secrets, Hadolint, image scanning (Trivy, Grype, Amazon Inspector), private container registry, Kubernetes API private endpoint, namespace/workload segmentation, NetworkPolicy, Falco / runtime protection, container security audit, GCC container workload, CS control catalog./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./cybersecurity:sg-gov-secure-coding-asfrom cybersecurity
npx claudepluginhub kyleoliveiro/sg-gov-skills --plugin cybersecurityOther plugins' skills for the same job