Source profileQuality 91/100

artalis-io/hull/.claude/skills/js-audit/SKILL.md

js-audit

Audit JavaScript stdlib code for security, correctness, and sandbox safety. Use when reviewing or hardening JS modules.

Source repository stars
17
Declared platforms
0
Static risk flags
0
Last source update
2026-08-24
Source checked
2026-08-25

Decision brief

What it does: where it fits

Perform comprehensive security, correctness, and quality audits on Hull JavaScript stdlib code.

Best for

  • Use when reviewing or hardening JS modules.

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/artalis-io/hull --skill ".claude/skills/js-audit"
Safe inspection promptEditorial

Inspect the Agent Skill "js-audit" from https://github.com/artalis-io/hull/blob/9d96662f3cb2055f1ed3c1e85de2d7fdca2cfc4a/.claude/skills/js-audit/SKILL.md at commit 9d96662f3cb2055f1ed3c1e85de2d7fdca2cfc4a. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Usage

    Review the “Usage” section in the pinned source before continuing.

    Review and apply the “Usage” source section.
  2. 02

    Audit Procedure

    When /js-audit is invoked:

    Locate FilesScan for Critical IssuesSearch for eval(, Function(, new Function( — sandbox escapes
  3. 03

    Hull JS Context

    Hull JS code runs inside a sandboxed QuickJS (ES2023) interpreter: - Removed globals: eval() disabled at C level - Not loaded: std, os modules - Memory limit: 64 MB (JSSetMemoryLimit) - Stack limit: 1 MB (JSSetMaxStackSize) - Gas metering: Instruction-count interrupt handler - M…

    Removed globals: eval() disabled at C levelNot loaded: std, os modulesMemory limit: 64 MB (JSSetMemoryLimit)
  4. 04

    Audit Categories

    Hull-specific: The template engine's template.compile() uses JSEval via C bridge — this is the ONLY allowed code compilation path. Verify no JS-level code compilation exists.

    Hull-specific: The template engine's template.compile() uses JSEval via C bridge — this is the ONLY allowed code compilation path. Verify no JS-level code compilation exists.Constant-time comparison:
  5. 05

    1. Sandbox Safety (Critical)

    Hull-specific: The template engine's template.compile() uses JSEval via C bridge — this is the ONLY allowed code compilation path. Verify no JS-level code compilation exists.

    Hull-specific: The template engine's template.compile() uses JSEval via C bridge — this is the ONLY allowed code compilation path. Verify no JS-level code compilation exists.

Permission review

Static risk signals and limitations

No configured static risk pattern was detected

This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score91/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars17SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
artalis-io/hull
Skill path
.claude/skills/js-audit/SKILL.md
Commit
9d96662f3cb2055f1ed3c1e85de2d7fdca2cfc4a
License
AGPL-3.0
Collected
2026-08-25
Default branch
main
View the original SKILL.md

JavaScript Code Audit Skill

Perform comprehensive security, correctness, and quality audits on Hull JavaScript stdlib code.

Target: $ARGUMENTS (default: all stdlib/js/hull/*.js files)

Usage

/js-audit                               # Audit all JS stdlib modules
/js-audit stdlib/js/hull/template.js    # Audit a specific module
/js-audit --fix                         # Audit and apply fixes

Hull JS Context

Hull JS code runs inside a sandboxed QuickJS (ES2023) interpreter:

  • Removed globals: eval() disabled at C level
  • Not loaded: std, os modules
  • Memory limit: 64 MB (JS_SetMemoryLimit)
  • Stack limit: 1 MB (JS_SetMaxStackSize)
  • Gas metering: Instruction-count interrupt handler
  • Module system: Only hull:* modules available via import
  • C capabilities: db, crypto, time, env, fs, http — accessed through hull module imports

Audit Categories

1. Sandbox Safety (Critical)

IssuePattern to FindSeverity
Sandbox escapeUse of eval(), Function() constructor, new Function()Critical
Unsafe evalString-to-code conversion outside C bridge _template.compile()Critical
Module smugglingimport of non-hull modulesCritical
Global pollutionWriting to globalThis or undeclared variables (non-strict)High
Prototype pollutionModifying Object.prototype, Array.prototype, etc.Critical
Symbol abuseUsing Symbol.toPrimitive or Symbol.hasInstance to bypass checksMedium
Proxy trap abuseUsing Proxy objects to intercept capability callsHigh

Hull-specific: The template engine's _template.compile() uses JS_Eval via C bridge — this is the ONLY allowed code compilation path. Verify no JS-level code compilation exists.

2. Input Validation & Injection

IssuePattern to FindSeverity
SQL injectionString concatenation/template literals in SQL queriesCritical
XSS via templateUnescaped user data in template outputHigh
Path traversalUnsanitized paths passed to fs.*High
Header injection\r\n in HTTP header valuesHigh
Command injectionUser input in tool.spawn() argumentsCritical
Timing attackNon-constant-time string comparison of secrets/tokensHigh
ReDoSUnbounded regex on user inputMedium

SQL safety check:

// BAD: template literal interpolation
db.query(`SELECT * FROM users WHERE id = ${id}`);

// BAD: string concatenation
db.query("SELECT * FROM users WHERE id = " + id);

// GOOD: parameterized
db.query("SELECT * FROM users WHERE id = ?", [id]);

Template safety check:

// BAD: raw output of user data
template.renderString("{{{ user_input }}}", data);

// GOOD: auto-escaped output
template.renderString("{{ user_input }}", data);

3. Error Handling

IssuePattern to FindSeverity
Unchecked null/undefinedProperty access on potentially null valueHigh
Swallowed exceptionstry/catch that discards errorMedium
Missing error propagationError condition not thrown or returnedMedium
Bare throwThrowing non-Error objects (strings, numbers)Low
Unhandled promise rejectionAsync operations without .catch() or try/catchMedium
Missing return after errorFunction continues after error conditionHigh

Patterns to check:

// BAD: unchecked
const result = db.query("SELECT * FROM users WHERE id = ?", [id]);
const name = result[0].name;  // crashes if result is empty

// GOOD: null-safe
const result = db.query("SELECT * FROM users WHERE id = ?", [id]);
if (!result || result.length === 0) return null;
const name = result[0].name;

4. Type Safety

IssuePattern to FindSeverity
Missing type checksFunction params not validated with typeofMedium
Loose equalityUsing == instead of ===Medium
Null vs undefined confusionNot distinguishing null from undefinedLow
NaN propagationArithmetic on non-numbers without isNaN() checkMedium
Implicit coercion+ operator on mixed types (string + number)Medium
Array method on non-array.map(), .filter() on potentially non-array valuesMedium

JS-specific pitfalls:

// BAD: loose equality
if (value == null)  // matches both null and undefined

// GOOD: explicit
if (value === null || value === undefined)

// BAD: implicit coercion
const total = count + "items"  // "5items" not "5 items"

// GOOD: explicit
const total = `${count} items`

5. Resource Management

IssuePattern to FindSeverity
Unbounded Map/Set growthCollections that grow without limitHigh
Missing cache evictionCaches without TTL or size limitMedium
Closure leaksClosures capturing large objects unnecessarilyMedium
String concatenation in loopss += chunk in tight loopsMedium
Large intermediate arraysBuilding arrays that could exceed memory limitMedium
WeakRef/FinalizationRegistryNot available in QuickJS — don't rely on themLow

Performance patterns:

// BAD: O(n^2) string building
let s = "";
for (const item of items) {
    s += item;  // copies entire string each iteration
}

// GOOD: array join
const parts = [];
for (const item of items) {
    parts.push(item);
}
const s = parts.join("");

6. Crypto & Auth Safety

IssuePattern to FindSeverity
Hardcoded secretsLiteral strings used as HMAC/JWT secretsCritical
Weak secretsShort or predictable secret valuesHigh
Timing attacks=== comparison on HMAC digests or tokensHigh
Missing expiryTokens/sessions without TTLMedium
Insecure defaultssecure flag missing on cookies, httpOnly not setMedium
Nonce reuseSame nonce/IV used for multiple encryptionsCritical

Constant-time comparison:

// BAD: early-exit comparison
if (token === expected) { ... }

// GOOD: use crypto.verifyPassword or HMAC-then-compare
// Hull's jwt.verify and csrf.verify use constant-time internally

7. API Consistency (JS vs Lua parity)

IssueWhat to CheckSeverity
Missing APIFunction exists in Lua but not JS (or vice versa)Medium
Different behaviorSame function returns different types or formatsHigh
Naming mismatchAPI names don't follow convention (JS: camelCase, Lua: snake_case)Low
Different defaultsDefault option values differ between runtimesMedium
Error formatDifferent error message formatsLow

8. Template Engine Specific

IssuePattern to FindSeverity
Code injection in codegenUser data interpolated into generated JS sourceCritical
Circular inheritance{% extends %} chains without cycle detectionHigh
Unbounded recursionDeeply nested includes without depth limitHigh
Cache poisoningTemplate cache key collision or manipulationMedium
Filter bypassCustom filter that returns unescaped HTMLMedium
Denial of serviceTemplate that generates unbounded outputMedium
Prototype pollution in dataTemplate data object with __proto__ keyHigh

9. QuickJS-Specific Issues

IssuePattern to FindSeverity
Missing ES2023 polyfillsUsing APIs not supported by QuickJSMedium
BigInt overflowBigInt operations without boundsLow
ArrayBuffer detachSharedArrayBuffer not availableLow
Module resolutionDynamic import() not availableMedium
Generator memoryUnbounded generator/iterator stateMedium

10. Dead Code & Style

PatternIssueFix
Unreachable code after return/throwDead codeRemove
Unused const/let variablesDead variableRemove
Unused function parametersDead parameterPrefix with _
Commented-out code blocksDead codeRemove
Unused import bindingsDead importRemove
Empty if/else/catch blocksDead branchRemove

Audit Procedure

When /js-audit is invoked:

  1. Locate Files

    stdlib/js/hull/*.js                     # All JS stdlib modules
    examples/*/app.js                       # Example apps (reference patterns)
    tests/fixtures/*/app.js                 # Test fixture apps
    
  2. Scan for Critical Issues

    • Search for eval(, Function(, new Function( — sandbox escapes
    • Search for template literal SQL: db.query(`...${` or db.query("..." + — SQL injection
    • Search for {{{ in template strings — raw output of user data
    • Search for === comparison of secrets, tokens, hashes
    • Search for hardcoded secret strings
    • Search for globalThis. or globalThis[ — global pollution
    • Search for __proto__, constructor.prototype — prototype pollution
  3. Review Each Module

    • Check public API functions for input validation
    • Check error handling (null/undefined checks, try/catch)
    • Check resource cleanup (cache sizes, collection growth)
    • Verify API parity with Lua equivalent
  4. Check Template Engine

    • Verify codegen never interpolates user data into generated source
    • Verify HTML escaping covers & < > " '
    • Verify null-safe dot paths (optional chaining)
    • Verify circular extends detection
    • Verify include depth limit
  5. Generate Report Format as markdown table with findings, severity, file:line, and suggested fix.

Report Format

## JS Audit Report: Hull

**Date:** YYYY-MM-DD
**Files Scanned:** N
**Issues Found:** N (Critical: N, High: N, Medium: N, Low: N)

### Critical Issues

| # | File:Line | Issue | Current Code | Suggested Fix |
|---|-----------|-------|--------------|---------------|
| C1 | stdlib/js/hull/auth.js:42 | SQL injection | `` db.query(`...${id}`) `` | `db.query("...?", [id])` |

### High Issues
...

### Medium Issues
...

### Low Issues
...

### Recommendations
1. ...

Fix Mode (--fix)

When --fix is specified:

  1. Generate the audit report first
  2. For each fixable issue, apply the transformation
  3. Rebuild (make)
  4. Re-run tests (make test && make e2e-templates)
  5. Report any test failures

Auto-fixable Issues:

  • SQL string interpolation -> parameterized queries
  • == -> === (strict equality)
  • Unused variables -> remove or prefix with _
  • s += x in loops -> array.push + .join("") pattern
  • Missing null checks -> add guard clause
  • Commented-out code blocks -> remove

NOT Auto-fixable (require manual review):

  • Logic errors
  • Crypto/auth design flaws
  • API parity mismatches (may require Lua changes too)
  • Template codegen injection paths
  • Prototype pollution vectors
  • Resource leak in complex control flow

Frequently asked questions

What to verify before installation and use

What does the js-audit source document cover?

Perform comprehensive security, correctness, and quality audits on Hull JavaScript stdlib code.

How do I install js-audit?

The source record exposes this install command: npx skills add https://github.com/artalis-io/hull --skill ".claude/skills/js-audit". Inspect the command and pinned source before running it.

Alternatives

Compare before choosing

Computed 10045,511

coreyhaines31/marketingskills

ab-testing

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program

Computed 10029,034

garrytan/gbrain

bulk-ingestion

End-to-end discipline for turning any large data source (audio libraries, email takeouts, document corpora, chat exports, API dumps) into brain pages at scale. The lifecycle spine: SCHEMA → ACCESS → TRIAL → EVALUATE → IMPROVE → CODIFY → TEST → SKILLIFY → BULK → MONITOR. State is tracked in a durable JSON manifest (see MANIFEST-PATTERN.md) so any crash, session boundary, or subagent fan-out resumes from ground truth instead of memory.

Computed 10024,921

alirezarezvani/claude-skills

app-store-optimization

App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

Computed 1005,241

dotnet/skills

migrate-vstest-to-mtp

Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing