netsuite-owasp-secure-coding
Platform-agnostic OWASP secure coding practices with JavaScript/Node.js patterns and NetSuite SuiteScript examples. Covers Open Worldwide Application Security Project (OWASP) Top 10 (2021), output encoding, injection prevention, CSP headers, file security, API hardening, AI agent security, DRY security patterns, and 48+ security pitfalls with GOOD/BAD code templates.
What this skill does
# OWASP Secure Coding Practices ## 1. Description This skill provides **implementation-depth OWASP secure coding coverage** for JavaScript and SuiteScript 2.1 development. It is the primary security reference for writing, reviewing, and auditing code. **What This Skill Covers:** - Complete OWASP Top 10 (2021) mapping with code-level mitigation patterns - 48 cataloged security pitfalls (OSCP-001 through OSCP-048) with BAD/GOOD code examples - Platform-agnostic JavaScript security patterns applicable beyond NetSuite - SuiteScript-specific security patterns for RESTlets, Suitelets, Client Scripts, and more - Output encoding for five HTML contexts (body, attribute, JavaScript, URL, CSS) - CSP header construction and deployment - File upload/download validation pipelines - API and RESTlet hardening patterns - AI agent security considerations for tool-assisted development - DRY security architecture: shared validation modules, centralized encoding, single-source configs - A mandatory security review checklist for every code review **Relationship to Existing Security Content:** If available, the `netsuite-sdf-leading-practices` skill contains two security-related principles from the SAFE Guide: - **Principle 5 (`05-security-privacy.md`)** -- Owns NetSuite-specific security topics: roles and permissions, token-based authentication (TBA), N/crypto module usage, PCI-DSS awareness, credential storage via script parameters, and SuiteCloud platform security features. - **Principle 11 (`11-security-best-practices.md`)** -- Owns OWASP awareness-level guidance: the core security principles list, a high-level OWASP Top 10 overview, basic input sanitization patterns, and parameterized query awareness. **This skill** (`netsuite-owasp-secure-coding`) provides everything below the awareness level: full implementation depth, exhaustive code patterns, all 48 pitfalls, context-specific encoding, CSP templates, file security, API hardening, client-side defenses, logging safety, and AI agent threat mitigation. It references Principles 5 and 11 where appropriate rather than duplicating their NetSuite-specific content. --- ## 2. How to Use ### Invocation Use this skill whenever you need a security review, threat analysis, or implementation guidance for SuiteScript or JavaScript security concerns. If your client supports explicit skill activation by name, activate `netsuite-owasp-secure-coding` and request the topic you need. ### Auto-Activation Triggers This skill auto-activates when the agent detects security-relevant context in the conversation. See Section 3 for the complete trigger list. ### Reference Files All deep-dive content is in the local `references/` directory. The skill loads the appropriate reference files based on the detected security topic. You can also request a specific reference directly: ``` Review this RESTlet for security issues. Load the injection prevention reference. Load the CSP header templates appendix. ``` --- ## 3. When to Use ### Keyword Triggers The skill activates when any of the following keywords or phrases appear in the conversation or code context: **Injection and Input:** `injection`, `sanitize`, `sanitise`, `validate input`, `SQL concatenation`, `string concatenation query`, `parameterized`, `prepared statement`, `user input` **XSS and Output:** `XSS`, `cross-site scripting`, `encode`, `output encoding`, `innerHTML`, `textContent`, `dangerouslySetInnerHTML`, `template literal injection` **Authentication and Session:** `auth`, `authentication`, `session`, `CSRF`, `token`, `TBA`, `OAuth`, `credential`, `password`, `login`, `logout`, `session fixation` **Headers and Browser:** `CSP`, `Content-Security-Policy`, `CORS`, `X-Frame-Options`, `HSTS`, `security header`, `postMessage`, `clickjacking` **Cryptography:** `crypto`, `hash`, `encrypt`, `decrypt`, `MD5`, `SHA-1`, `SHA-256`, `Math.random`, `nonce`, `HMAC`, `AES`, `secret key` **File Operations:** `file upload`, `file download`, `path traversal`, `MIME type`, `magic bytes`, `zip bomb`, `filename sanitization` **API and Network:** `RESTlet`, `Suitelet`, `API security`, `rate limit`, `SSRF`, `webhook`, `schema validation`, `request validation` **General Security:** `security`, `vulnerability`, `OWASP`, `pentest`, `hardening`, `exploit`, `attack surface`, `threat model`, `security review`, `security audit` **AI and Agent:** `prompt injection`, `AI security`, `agent security`, `tool poisoning`, `AI output validation`, `data exfiltration` ### Code Context Triggers The skill also activates when the agent detects these code patterns: - Writing or reviewing RESTlet scripts (`@NScriptType Restlet`) - Writing or reviewing Suitelets that generate HTML (`response.write`, `INLINEHTML`) - Client scripts with DOM manipulation (`innerHTML`, `document.write`, `eval`) - SuiteQL queries being constructed (`query.runSuiteQL`, `query.runSuiteQLPaged`, `N/query`) - File operations (`N/file`, `file.create`, `file.load`) - External HTTP calls (`N/https`, `https.post`, `https.get`) - Cryptographic operations (`N/crypto`, `createHash`, `createCipher`) - Any code review or security audit request --- ## 4. Companion Reference Map This skill is self-contained. To avoid content duplication, this map distinguishes what this skill owns from optional companion references that may exist in a broader NetSuite guidance set. | Source | Owns | Relationship to This Skill | |--------|------|----------------------------| | `netsuite-owasp-secure-coding` (This skill) | Full OWASP Top 10 implementation depth, all 48 OSCP pitfalls, five-context output encoding, CSP header construction, file upload/download validation pipeline, API/RESTlet hardening, client-side defenses (postMessage, DOM XSS, CSRF), logging safety, AI agent security, DRY security module patterns | Primary and authoritative source for implementation guidance in this package | | `05-security-privacy.md` (`netsuite-sdf-leading-practices`, optional companion reference) | NS roles and permissions, TBA authentication patterns, N/crypto module overview, PCI-DSS awareness, credential storage via Script Parameters, SuiteCloud platform security features | Supplemental background only; not required for this skill | | `11-security-best-practices.md` (`netsuite-sdf-leading-practices`, optional companion reference) | OWASP awareness list, core security principles, basic sanitize pattern, basic parameterized query mention, defense-in-depth overview | Supplemental background only; not required for this skill | **Cross-Reference Rules:** 1. Use this skill as the authoritative source for code-level implementation guidance. 2. If optional companion references are available, use them only for adjacent background such as role setup, token rotation, or high-level principles. 3. Do not assume companion references are installed; answer from this skill's local content first. --- ## 5. OWASP Top 10 (2021) Quick Map Each OWASP Top 10 category is mapped to the reference files in this skill that provide detailed coverage. | Category | ID | Reference Files | Key Topics | |----------|----|--------------------|------------| | Broken Access Control | A01:2021 | `04-access-control.md` | RBAC, IDOR, privilege escalation, runasrole, deployment audience | | Cryptographic Failures | A02:2021 | `06-cryptography-data-protection.md` | SHA-256+, AES-256, key management, PII masking, CSPRNG | | Injection | A03:2021 | `01-injection-prevention.md`, `03-xss-output-encoding.md` | SuiteQL params, LDAP escape, CRLF, XSS, DOM sinks | | Insecure Design | A04:2021 | (Covered across multiple) | Threat modeling, defense in depth, least privilege | | Security Misconfiguration | A05:2021 | `05-security-misconfiguration.md` | Error messages, debug mode, headers, default creds, SDF manifest | | Vulnerable Components | A06:2021 | `05-security-misconfiguration.md` | Dependency audit, feature minimization, unused endpoints | | Authentication Failures | A07:2021 | `02-
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.