cli-jaw 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.ko.md +411 -0
- package/README.md +416 -0
- package/README.zh-CN.md +411 -0
- package/dist/bin/cli-jaw.js +108 -0
- package/dist/bin/cli-jaw.js.map +1 -0
- package/dist/bin/commands/browser.js +241 -0
- package/dist/bin/commands/browser.js.map +1 -0
- package/dist/bin/commands/chat.js +878 -0
- package/dist/bin/commands/chat.js.map +1 -0
- package/dist/bin/commands/doctor.js +152 -0
- package/dist/bin/commands/doctor.js.map +1 -0
- package/dist/bin/commands/employee.js +70 -0
- package/dist/bin/commands/employee.js.map +1 -0
- package/dist/bin/commands/init.js +110 -0
- package/dist/bin/commands/init.js.map +1 -0
- package/dist/bin/commands/mcp.js +219 -0
- package/dist/bin/commands/mcp.js.map +1 -0
- package/dist/bin/commands/memory.js +105 -0
- package/dist/bin/commands/memory.js.map +1 -0
- package/dist/bin/commands/reset.js +109 -0
- package/dist/bin/commands/reset.js.map +1 -0
- package/dist/bin/commands/serve.js +75 -0
- package/dist/bin/commands/serve.js.map +1 -0
- package/dist/bin/commands/skill.js +232 -0
- package/dist/bin/commands/skill.js.map +1 -0
- package/dist/bin/commands/status.js +51 -0
- package/dist/bin/commands/status.js.map +1 -0
- package/dist/bin/postinstall.js +218 -0
- package/dist/bin/postinstall.js.map +1 -0
- package/dist/lib/mcp-sync.js +639 -0
- package/dist/lib/mcp-sync.js.map +1 -0
- package/dist/lib/quota-copilot.js +62 -0
- package/dist/lib/quota-copilot.js.map +1 -0
- package/dist/lib/upload.js +72 -0
- package/dist/lib/upload.js.map +1 -0
- package/dist/server.js +832 -0
- package/dist/server.js.map +1 -0
- package/dist/src/agent/args.js +66 -0
- package/dist/src/agent/args.js.map +1 -0
- package/dist/src/agent/events.js +328 -0
- package/dist/src/agent/events.js.map +1 -0
- package/dist/src/agent/spawn.js +646 -0
- package/dist/src/agent/spawn.js.map +1 -0
- package/dist/src/browser/actions.js +168 -0
- package/dist/src/browser/actions.js.map +1 -0
- package/dist/src/browser/connection.js +79 -0
- package/dist/src/browser/connection.js.map +1 -0
- package/dist/src/browser/index.js +4 -0
- package/dist/src/browser/index.js.map +1 -0
- package/dist/src/browser/vision.js +128 -0
- package/dist/src/browser/vision.js.map +1 -0
- package/dist/src/cli/acp-client.js +298 -0
- package/dist/src/cli/acp-client.js.map +1 -0
- package/dist/src/cli/commands.js +267 -0
- package/dist/src/cli/commands.js.map +1 -0
- package/dist/src/cli/handlers.js +405 -0
- package/dist/src/cli/handlers.js.map +1 -0
- package/dist/src/cli/registry.js +87 -0
- package/dist/src/cli/registry.js.map +1 -0
- package/dist/src/command-contract/catalog.js +36 -0
- package/dist/src/command-contract/catalog.js.map +1 -0
- package/dist/src/command-contract/help-renderer.js +39 -0
- package/dist/src/command-contract/help-renderer.js.map +1 -0
- package/dist/src/command-contract/policy.js +34 -0
- package/dist/src/command-contract/policy.js.map +1 -0
- package/dist/src/core/bus.js +17 -0
- package/dist/src/core/bus.js.map +1 -0
- package/dist/src/core/config.js +198 -0
- package/dist/src/core/config.js.map +1 -0
- package/dist/src/core/db.js +97 -0
- package/dist/src/core/db.js.map +1 -0
- package/dist/src/core/i18n.js +86 -0
- package/dist/src/core/i18n.js.map +1 -0
- package/dist/src/core/logger.js +14 -0
- package/dist/src/core/logger.js.map +1 -0
- package/dist/src/core/settings-merge.js +40 -0
- package/dist/src/core/settings-merge.js.map +1 -0
- package/dist/src/http/async-handler.js +6 -0
- package/dist/src/http/async-handler.js.map +1 -0
- package/dist/src/http/error-middleware.js +24 -0
- package/dist/src/http/error-middleware.js.map +1 -0
- package/dist/src/http/response.js +16 -0
- package/dist/src/http/response.js.map +1 -0
- package/dist/src/memory/heartbeat.js +106 -0
- package/dist/src/memory/heartbeat.js.map +1 -0
- package/dist/src/memory/memory.js +119 -0
- package/dist/src/memory/memory.js.map +1 -0
- package/dist/src/memory/worklog.js +154 -0
- package/dist/src/memory/worklog.js.map +1 -0
- package/dist/src/orchestrator/distribute.js +310 -0
- package/dist/src/orchestrator/distribute.js.map +1 -0
- package/dist/src/orchestrator/parser.js +118 -0
- package/dist/src/orchestrator/parser.js.map +1 -0
- package/dist/src/orchestrator/pipeline.js +343 -0
- package/dist/src/orchestrator/pipeline.js.map +1 -0
- package/dist/src/prompt/builder.js +531 -0
- package/dist/src/prompt/builder.js.map +1 -0
- package/dist/src/routes/browser.js +126 -0
- package/dist/src/routes/browser.js.map +1 -0
- package/dist/src/routes/quota.js +94 -0
- package/dist/src/routes/quota.js.map +1 -0
- package/dist/src/security/decode.js +23 -0
- package/dist/src/security/decode.js.map +1 -0
- package/dist/src/security/path-guards.js +62 -0
- package/dist/src/security/path-guards.js.map +1 -0
- package/dist/src/telegram/bot.js +469 -0
- package/dist/src/telegram/bot.js.map +1 -0
- package/dist/src/telegram/forwarder.js +93 -0
- package/dist/src/telegram/forwarder.js.map +1 -0
- package/package.json +80 -0
- package/public/css/chat.css +571 -0
- package/public/css/layout.css +350 -0
- package/public/css/markdown.css +270 -0
- package/public/css/modals.css +172 -0
- package/public/css/sidebar.css +225 -0
- package/public/css/variables.css +142 -0
- package/public/index.html +470 -0
- package/public/js/api.js +55 -0
- package/public/js/constants.js +119 -0
- package/public/js/features/appname.js +43 -0
- package/public/js/features/chat.js +242 -0
- package/public/js/features/employees.js +120 -0
- package/public/js/features/heartbeat.js +80 -0
- package/public/js/features/i18n.js +125 -0
- package/public/js/features/memory.js +85 -0
- package/public/js/features/settings.js +512 -0
- package/public/js/features/sidebar.js +88 -0
- package/public/js/features/skills.js +68 -0
- package/public/js/features/slash-commands.js +231 -0
- package/public/js/features/theme.js +40 -0
- package/public/js/locale.js +23 -0
- package/public/js/main.js +281 -0
- package/public/js/render.js +294 -0
- package/public/js/state.js +16 -0
- package/public/js/ui.js +172 -0
- package/public/js/ws.js +76 -0
- package/public/locales/en.json +180 -0
- package/public/locales/ko.json +180 -0
- package/public/theme-test.html +545 -0
- package/skills_ref/1password/SKILL.md +70 -0
- package/skills_ref/agents-sdk/SKILL.md +155 -0
- package/skills_ref/agents-sdk/references/callable.md +92 -0
- package/skills_ref/agents-sdk/references/codemode.md +207 -0
- package/skills_ref/agents-sdk/references/email.md +146 -0
- package/skills_ref/agents-sdk/references/mcp.md +154 -0
- package/skills_ref/agents-sdk/references/state-scheduling.md +164 -0
- package/skills_ref/agents-sdk/references/streaming-chat.md +178 -0
- package/skills_ref/agents-sdk/references/workflows.md +132 -0
- package/skills_ref/algorithmic-art/LICENSE.txt +202 -0
- package/skills_ref/algorithmic-art/SKILL.md +405 -0
- package/skills_ref/algorithmic-art/templates/generator_template.js +223 -0
- package/skills_ref/algorithmic-art/templates/viewer.html +599 -0
- package/skills_ref/apple-notes/SKILL.md +77 -0
- package/skills_ref/apple-reminders/SKILL.md +118 -0
- package/skills_ref/atlas/SKILL.md +99 -0
- package/skills_ref/brainstorming/SKILL.md +96 -0
- package/skills_ref/browser/SKILL.md +179 -0
- package/skills_ref/canvas-design/LICENSE.txt +202 -0
- package/skills_ref/canvas-design/SKILL.md +130 -0
- package/skills_ref/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/skills_ref/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/skills_ref/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/skills_ref/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/skills_ref/changelog-generator/SKILL.md +104 -0
- package/skills_ref/cloudflare-deploy/SKILL.md +207 -0
- package/skills_ref/codebase-orientation/SKILL.md +29 -0
- package/skills_ref/config-file-explainer/SKILL.md +26 -0
- package/skills_ref/context-compression/SKILL.md +265 -0
- package/skills_ref/context-compression/references/evaluation-framework.md +213 -0
- package/skills_ref/context-compression/scripts/compression_evaluator.py +658 -0
- package/skills_ref/data-structure-chooser/SKILL.md +26 -0
- package/skills_ref/debugging-checklist/SKILL.md +26 -0
- package/skills_ref/debugging-helpers/CREATION-LOG.md +119 -0
- package/skills_ref/debugging-helpers/SKILL.md +296 -0
- package/skills_ref/debugging-helpers/condition-based-waiting-example.ts +158 -0
- package/skills_ref/debugging-helpers/condition-based-waiting.md +115 -0
- package/skills_ref/debugging-helpers/defense-in-depth.md +122 -0
- package/skills_ref/debugging-helpers/find-polluter.sh +63 -0
- package/skills_ref/debugging-helpers/root-cause-tracing.md +169 -0
- package/skills_ref/debugging-helpers/test-academic.md +14 -0
- package/skills_ref/debugging-helpers/test-pressure-1.md +58 -0
- package/skills_ref/debugging-helpers/test-pressure-2.md +68 -0
- package/skills_ref/debugging-helpers/test-pressure-3.md +69 -0
- package/skills_ref/deep-research/.env.example +7 -0
- package/skills_ref/deep-research/README.md +246 -0
- package/skills_ref/deep-research/SKILL.md +106 -0
- package/skills_ref/deep-research/requirements.txt +2 -0
- package/skills_ref/deep-research/scripts/research.py +692 -0
- package/skills_ref/dependency-install-helper/SKILL.md +26 -0
- package/skills_ref/dev/SKILL.md +65 -0
- package/skills_ref/dev-backend/SKILL.md +61 -0
- package/skills_ref/dev-data/SKILL.md +76 -0
- package/skills_ref/dev-frontend/LICENSE.txt +177 -0
- package/skills_ref/dev-frontend/SKILL.md +42 -0
- package/skills_ref/dev-testing/LICENSE.txt +202 -0
- package/skills_ref/dev-testing/SKILL.md +96 -0
- package/skills_ref/dev-testing/examples/console_logging.py +35 -0
- package/skills_ref/dev-testing/examples/element_discovery.py +40 -0
- package/skills_ref/dev-testing/examples/static_html_automation.py +33 -0
- package/skills_ref/dev-testing/scripts/with_server.py +106 -0
- package/skills_ref/develop-web-game/SKILL.md +149 -0
- package/skills_ref/differential-review/.claude-plugin/plugin.json +10 -0
- package/skills_ref/differential-review/README.md +109 -0
- package/skills_ref/differential-review/commands/diff-review.md +21 -0
- package/skills_ref/differential-review/skills/differential-review/SKILL.md +220 -0
- package/skills_ref/differential-review/skills/differential-review/adversarial.md +203 -0
- package/skills_ref/differential-review/skills/differential-review/methodology.md +234 -0
- package/skills_ref/differential-review/skills/differential-review/patterns.md +300 -0
- package/skills_ref/differential-review/skills/differential-review/reporting.md +369 -0
- package/skills_ref/dispatching-parallel-agents/SKILL.md +180 -0
- package/skills_ref/doc-coauthoring/SKILL.md +375 -0
- package/skills_ref/docx/LICENSE.txt +30 -0
- package/skills_ref/docx/SKILL.md +481 -0
- package/skills_ref/docx/scripts/__init__.py +1 -0
- package/skills_ref/docx/scripts/accept_changes.py +135 -0
- package/skills_ref/docx/scripts/comment.py +318 -0
- package/skills_ref/docx/scripts/office/helpers/__init__.py +0 -0
- package/skills_ref/docx/scripts/office/helpers/merge_runs.py +199 -0
- package/skills_ref/docx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/skills_ref/docx/scripts/office/pack.py +159 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/skills_ref/docx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/skills_ref/docx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/skills_ref/docx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/skills_ref/docx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/skills_ref/docx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/skills_ref/docx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/skills_ref/docx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/skills_ref/docx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/skills_ref/docx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/skills_ref/docx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/skills_ref/docx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/skills_ref/docx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/skills_ref/docx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/skills_ref/docx/scripts/office/soffice.py +183 -0
- package/skills_ref/docx/scripts/office/unpack.py +132 -0
- package/skills_ref/docx/scripts/office/validate.py +111 -0
- package/skills_ref/docx/scripts/office/validators/__init__.py +15 -0
- package/skills_ref/docx/scripts/office/validators/base.py +847 -0
- package/skills_ref/docx/scripts/office/validators/docx.py +446 -0
- package/skills_ref/docx/scripts/office/validators/pptx.py +275 -0
- package/skills_ref/docx/scripts/office/validators/redlining.py +247 -0
- package/skills_ref/docx/scripts/templates/comments.xml +3 -0
- package/skills_ref/docx/scripts/templates/commentsExtended.xml +3 -0
- package/skills_ref/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/skills_ref/docx/scripts/templates/commentsIds.xml +3 -0
- package/skills_ref/docx/scripts/templates/people.xml +3 -0
- package/skills_ref/durable-objects/SKILL.md +186 -0
- package/skills_ref/durable-objects/references/rules.md +286 -0
- package/skills_ref/durable-objects/references/testing.md +264 -0
- package/skills_ref/durable-objects/references/workers.md +346 -0
- package/skills_ref/email-draft-polish/SKILL.md +24 -0
- package/skills_ref/error-message-explainer/SKILL.md +27 -0
- package/skills_ref/fal-image-edit/SKILL.md +249 -0
- package/skills_ref/fal-image-edit/scripts/edit-image.sh +199 -0
- package/skills_ref/figma-implement-design/SKILL.md +264 -0
- package/skills_ref/git-worktrees/SKILL.md +218 -0
- package/skills_ref/github/SKILL.md +210 -0
- package/skills_ref/gog/SKILL.md +116 -0
- package/skills_ref/goplaces/SKILL.md +52 -0
- package/skills_ref/himalaya/SKILL.md +257 -0
- package/skills_ref/hugging-face-cli/SKILL.md +186 -0
- package/skills_ref/hugging-face-cli/references/commands.md +954 -0
- package/skills_ref/hugging-face-cli/references/examples.md +374 -0
- package/skills_ref/hugging-face-evaluation/SKILL.md +651 -0
- package/skills_ref/hugging-face-evaluation/examples/.env.example +7 -0
- package/skills_ref/hugging-face-evaluation/examples/USAGE_EXAMPLES.md +382 -0
- package/skills_ref/hugging-face-evaluation/examples/artificial_analysis_to_hub.py +141 -0
- package/skills_ref/hugging-face-evaluation/examples/example_readme_tables.md +135 -0
- package/skills_ref/hugging-face-evaluation/examples/metric_mapping.json +50 -0
- package/skills_ref/hugging-face-evaluation/requirements.txt +20 -0
- package/skills_ref/hugging-face-evaluation/scripts/evaluation_manager.py +1374 -0
- package/skills_ref/hugging-face-evaluation/scripts/inspect_eval_uv.py +104 -0
- package/skills_ref/hugging-face-evaluation/scripts/inspect_vllm_uv.py +317 -0
- package/skills_ref/hugging-face-evaluation/scripts/lighteval_vllm_uv.py +303 -0
- package/skills_ref/hugging-face-evaluation/scripts/run_eval_job.py +98 -0
- package/skills_ref/hugging-face-evaluation/scripts/run_vllm_eval_job.py +331 -0
- package/skills_ref/hugging-face-evaluation/scripts/test_extraction.py +206 -0
- package/skills_ref/hugging-face-model-trainer/SKILL.md +718 -0
- package/skills_ref/hugging-face-model-trainer/references/gguf_conversion.md +296 -0
- package/skills_ref/hugging-face-model-trainer/references/hardware_guide.md +283 -0
- package/skills_ref/hugging-face-model-trainer/references/hub_saving.md +364 -0
- package/skills_ref/hugging-face-model-trainer/references/reliability_principles.md +371 -0
- package/skills_ref/hugging-face-model-trainer/references/trackio_guide.md +189 -0
- package/skills_ref/hugging-face-model-trainer/references/training_methods.md +150 -0
- package/skills_ref/hugging-face-model-trainer/references/training_patterns.md +203 -0
- package/skills_ref/hugging-face-model-trainer/references/troubleshooting.md +282 -0
- package/skills_ref/hugging-face-model-trainer/references/unsloth.md +313 -0
- package/skills_ref/hugging-face-model-trainer/scripts/convert_to_gguf.py +424 -0
- package/skills_ref/hugging-face-model-trainer/scripts/dataset_inspector.py +417 -0
- package/skills_ref/hugging-face-model-trainer/scripts/estimate_cost.py +150 -0
- package/skills_ref/hugging-face-model-trainer/scripts/train_dpo_example.py +106 -0
- package/skills_ref/hugging-face-model-trainer/scripts/train_grpo_example.py +89 -0
- package/skills_ref/hugging-face-model-trainer/scripts/train_sft_example.py +122 -0
- package/skills_ref/hugging-face-model-trainer/scripts/unsloth_sft_example.py +512 -0
- package/skills_ref/imagegen/SKILL.md +174 -0
- package/skills_ref/insecure-defaults/.claude-plugin/plugin.json +10 -0
- package/skills_ref/insecure-defaults/README.md +45 -0
- package/skills_ref/insecure-defaults/skills/insecure-defaults/SKILL.md +117 -0
- package/skills_ref/insecure-defaults/skills/insecure-defaults/references/examples.md +409 -0
- package/skills_ref/jupyter-notebook/SKILL.md +107 -0
- package/skills_ref/linear/SKILL.md +87 -0
- package/skills_ref/linter-fix-guide/SKILL.md +27 -0
- package/skills_ref/log-summarizer/SKILL.md +27 -0
- package/skills_ref/mcp-builder/LICENSE.txt +202 -0
- package/skills_ref/mcp-builder/SKILL.md +236 -0
- package/skills_ref/mcp-builder/reference/evaluation.md +602 -0
- package/skills_ref/mcp-builder/reference/mcp_best_practices.md +249 -0
- package/skills_ref/mcp-builder/reference/node_mcp_server.md +970 -0
- package/skills_ref/mcp-builder/reference/python_mcp_server.md +719 -0
- package/skills_ref/mcp-builder/scripts/connections.py +151 -0
- package/skills_ref/mcp-builder/scripts/evaluation.py +373 -0
- package/skills_ref/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/skills_ref/mcp-builder/scripts/requirements.txt +2 -0
- package/skills_ref/memory/SKILL.md +129 -0
- package/skills_ref/modern-python/.claude-plugin/plugin.json +10 -0
- package/skills_ref/modern-python/README.md +66 -0
- package/skills_ref/modern-python/hooks/hooks.json +16 -0
- package/skills_ref/modern-python/hooks/setup-shims.bats +70 -0
- package/skills_ref/modern-python/hooks/setup-shims.sh +24 -0
- package/skills_ref/modern-python/hooks/shims/pip +27 -0
- package/skills_ref/modern-python/hooks/shims/pip-shim.bats +45 -0
- package/skills_ref/modern-python/hooks/shims/pip3 +27 -0
- package/skills_ref/modern-python/hooks/shims/pipx +41 -0
- package/skills_ref/modern-python/hooks/shims/pipx-shim.bats +64 -0
- package/skills_ref/modern-python/hooks/shims/python +26 -0
- package/skills_ref/modern-python/hooks/shims/python-shim.bats +53 -0
- package/skills_ref/modern-python/hooks/shims/python3 +26 -0
- package/skills_ref/modern-python/hooks/shims/uv +27 -0
- package/skills_ref/modern-python/hooks/shims/uv-shim.bats +47 -0
- package/skills_ref/modern-python/skills/modern-python/SKILL.md +333 -0
- package/skills_ref/modern-python/skills/modern-python/references/dependabot.md +43 -0
- package/skills_ref/modern-python/skills/modern-python/references/migration-checklist.md +141 -0
- package/skills_ref/modern-python/skills/modern-python/references/pep723-scripts.md +259 -0
- package/skills_ref/modern-python/skills/modern-python/references/prek.md +211 -0
- package/skills_ref/modern-python/skills/modern-python/references/pyproject.md +254 -0
- package/skills_ref/modern-python/skills/modern-python/references/ruff-config.md +240 -0
- package/skills_ref/modern-python/skills/modern-python/references/security-setup.md +255 -0
- package/skills_ref/modern-python/skills/modern-python/references/testing.md +284 -0
- package/skills_ref/modern-python/skills/modern-python/references/uv-commands.md +200 -0
- package/skills_ref/modern-python/skills/modern-python/templates/dependabot.yml +36 -0
- package/skills_ref/modern-python/skills/modern-python/templates/pre-commit-config.yaml +66 -0
- package/skills_ref/nano-banana-pro/SKILL.md +58 -0
- package/skills_ref/netlify-deploy/SKILL.md +233 -0
- package/skills_ref/notion/SKILL.md +304 -0
- package/skills_ref/notion-knowledge-capture/SKILL.md +56 -0
- package/skills_ref/notion-meeting-intelligence/SKILL.md +60 -0
- package/skills_ref/notion-research-documentation/SKILL.md +59 -0
- package/skills_ref/notion-spec-to-implementation/SKILL.md +58 -0
- package/skills_ref/obsidian/SKILL.md +81 -0
- package/skills_ref/openai-docs/SKILL.md +56 -0
- package/skills_ref/openhue/SKILL.md +112 -0
- package/skills_ref/pdf/SKILL.md +69 -0
- package/skills_ref/postgres/README.md +77 -0
- package/skills_ref/postgres/SKILL.md +129 -0
- package/skills_ref/postgres/connections.example.json +34 -0
- package/skills_ref/postgres/requirements.txt +1 -0
- package/skills_ref/postgres/scripts/query.py +262 -0
- package/skills_ref/pptx/LICENSE.txt +30 -0
- package/skills_ref/pptx/SKILL.md +232 -0
- package/skills_ref/pptx/editing.md +205 -0
- package/skills_ref/pptx/pptxgenjs.md +420 -0
- package/skills_ref/pptx/scripts/__init__.py +0 -0
- package/skills_ref/pptx/scripts/add_slide.py +195 -0
- package/skills_ref/pptx/scripts/clean.py +286 -0
- package/skills_ref/pptx/scripts/office/helpers/__init__.py +0 -0
- package/skills_ref/pptx/scripts/office/helpers/merge_runs.py +199 -0
- package/skills_ref/pptx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/skills_ref/pptx/scripts/office/pack.py +159 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/skills_ref/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/skills_ref/pptx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/skills_ref/pptx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/skills_ref/pptx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/skills_ref/pptx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/skills_ref/pptx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/skills_ref/pptx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/skills_ref/pptx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/skills_ref/pptx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/skills_ref/pptx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/skills_ref/pptx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/skills_ref/pptx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/skills_ref/pptx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/skills_ref/pptx/scripts/office/soffice.py +183 -0
- package/skills_ref/pptx/scripts/office/unpack.py +132 -0
- package/skills_ref/pptx/scripts/office/validate.py +111 -0
- package/skills_ref/pptx/scripts/office/validators/__init__.py +15 -0
- package/skills_ref/pptx/scripts/office/validators/base.py +847 -0
- package/skills_ref/pptx/scripts/office/validators/docx.py +446 -0
- package/skills_ref/pptx/scripts/office/validators/pptx.py +275 -0
- package/skills_ref/pptx/scripts/office/validators/redlining.py +247 -0
- package/skills_ref/pptx/scripts/thumbnail.py +289 -0
- package/skills_ref/property-based-testing/.claude-plugin/plugin.json +9 -0
- package/skills_ref/property-based-testing/README.md +47 -0
- package/skills_ref/property-based-testing/skills/property-based-testing/README.md +88 -0
- package/skills_ref/property-based-testing/skills/property-based-testing/SKILL.md +123 -0
- package/skills_ref/property-based-testing/skills/property-based-testing/references/design.md +191 -0
- package/skills_ref/property-based-testing/skills/property-based-testing/references/generating.md +204 -0
- package/skills_ref/property-based-testing/skills/property-based-testing/references/interpreting-failures.md +239 -0
- package/skills_ref/property-based-testing/skills/property-based-testing/references/libraries.md +130 -0
- package/skills_ref/property-based-testing/skills/property-based-testing/references/refactoring.md +181 -0
- package/skills_ref/property-based-testing/skills/property-based-testing/references/reviewing.md +209 -0
- package/skills_ref/property-based-testing/skills/property-based-testing/references/strategies.md +124 -0
- package/skills_ref/react-best-practices/AGENTS.md +2934 -0
- package/skills_ref/react-best-practices/README.md +123 -0
- package/skills_ref/react-best-practices/SKILL.md +136 -0
- package/skills_ref/react-best-practices/metadata.json +15 -0
- package/skills_ref/react-best-practices/rules/_sections.md +46 -0
- package/skills_ref/react-best-practices/rules/_template.md +28 -0
- package/skills_ref/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/skills_ref/react-best-practices/rules/advanced-init-once.md +42 -0
- package/skills_ref/react-best-practices/rules/advanced-use-latest.md +39 -0
- package/skills_ref/react-best-practices/rules/async-api-routes.md +38 -0
- package/skills_ref/react-best-practices/rules/async-defer-await.md +80 -0
- package/skills_ref/react-best-practices/rules/async-dependencies.md +51 -0
- package/skills_ref/react-best-practices/rules/async-parallel.md +28 -0
- package/skills_ref/react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/skills_ref/react-best-practices/rules/bundle-barrel-imports.md +59 -0
- package/skills_ref/react-best-practices/rules/bundle-conditional.md +31 -0
- package/skills_ref/react-best-practices/rules/bundle-defer-third-party.md +49 -0
- package/skills_ref/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
- package/skills_ref/react-best-practices/rules/bundle-preload.md +50 -0
- package/skills_ref/react-best-practices/rules/client-event-listeners.md +74 -0
- package/skills_ref/react-best-practices/rules/client-localstorage-schema.md +71 -0
- package/skills_ref/react-best-practices/rules/client-passive-event-listeners.md +48 -0
- package/skills_ref/react-best-practices/rules/client-swr-dedup.md +56 -0
- package/skills_ref/react-best-practices/rules/js-batch-dom-css.md +107 -0
- package/skills_ref/react-best-practices/rules/js-cache-function-results.md +80 -0
- package/skills_ref/react-best-practices/rules/js-cache-property-access.md +28 -0
- package/skills_ref/react-best-practices/rules/js-cache-storage.md +70 -0
- package/skills_ref/react-best-practices/rules/js-combine-iterations.md +32 -0
- package/skills_ref/react-best-practices/rules/js-early-exit.md +50 -0
- package/skills_ref/react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/skills_ref/react-best-practices/rules/js-index-maps.md +37 -0
- package/skills_ref/react-best-practices/rules/js-length-check-first.md +49 -0
- package/skills_ref/react-best-practices/rules/js-min-max-loop.md +82 -0
- package/skills_ref/react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/skills_ref/react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/skills_ref/react-best-practices/rules/rendering-activity.md +26 -0
- package/skills_ref/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
- package/skills_ref/react-best-practices/rules/rendering-conditional-render.md +40 -0
- package/skills_ref/react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/skills_ref/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
- package/skills_ref/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
- package/skills_ref/react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
- package/skills_ref/react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/skills_ref/react-best-practices/rules/rendering-usetransition-loading.md +75 -0
- package/skills_ref/react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/skills_ref/react-best-practices/rules/rerender-dependencies.md +45 -0
- package/skills_ref/react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
- package/skills_ref/react-best-practices/rules/rerender-derived-state.md +29 -0
- package/skills_ref/react-best-practices/rules/rerender-functional-setstate.md +74 -0
- package/skills_ref/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
- package/skills_ref/react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
- package/skills_ref/react-best-practices/rules/rerender-memo.md +44 -0
- package/skills_ref/react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
- package/skills_ref/react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
- package/skills_ref/react-best-practices/rules/rerender-transitions.md +40 -0
- package/skills_ref/react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
- package/skills_ref/react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/skills_ref/react-best-practices/rules/server-auth-actions.md +96 -0
- package/skills_ref/react-best-practices/rules/server-cache-lru.md +41 -0
- package/skills_ref/react-best-practices/rules/server-cache-react.md +76 -0
- package/skills_ref/react-best-practices/rules/server-dedup-props.md +65 -0
- package/skills_ref/react-best-practices/rules/server-parallel-fetching.md +83 -0
- package/skills_ref/react-best-practices/rules/server-serialization.md +38 -0
- package/skills_ref/receiving-code-review/SKILL.md +213 -0
- package/skills_ref/registry.json +1493 -0
- package/skills_ref/render-deploy/SKILL.md +462 -0
- package/skills_ref/requesting-code-review/SKILL.md +105 -0
- package/skills_ref/requesting-code-review/code-reviewer.md +146 -0
- package/skills_ref/screen-capture/SKILL.md +162 -0
- package/skills_ref/security-best-practices/LICENSE.txt +201 -0
- package/skills_ref/security-best-practices/SKILL.md +86 -0
- package/skills_ref/security-best-practices/agents/openai.yaml +4 -0
- package/skills_ref/security-best-practices/references/golang-general-backend-security.md +826 -0
- package/skills_ref/security-best-practices/references/javascript-express-web-server-security.md +1158 -0
- package/skills_ref/security-best-practices/references/javascript-general-web-frontend-security.md +747 -0
- package/skills_ref/security-best-practices/references/javascript-jquery-web-frontend-security.md +678 -0
- package/skills_ref/security-best-practices/references/javascript-typescript-nextjs-web-server-security.md +1144 -0
- package/skills_ref/security-best-practices/references/javascript-typescript-react-web-frontend-security.md +990 -0
- package/skills_ref/security-best-practices/references/javascript-typescript-vue-web-frontend-security.md +791 -0
- package/skills_ref/security-best-practices/references/python-django-web-server-security.md +882 -0
- package/skills_ref/security-best-practices/references/python-fastapi-web-server-security.md +1036 -0
- package/skills_ref/security-best-practices/references/python-flask-web-server-security.md +705 -0
- package/skills_ref/security-ownership-map/LICENSE.txt +201 -0
- package/skills_ref/security-ownership-map/SKILL.md +206 -0
- package/skills_ref/security-ownership-map/agents/openai.yaml +4 -0
- package/skills_ref/security-ownership-map/references/neo4j-import.md +60 -0
- package/skills_ref/security-ownership-map/scripts/build_ownership_map.py +956 -0
- package/skills_ref/security-ownership-map/scripts/community_maintainers.py +544 -0
- package/skills_ref/security-ownership-map/scripts/query_ownership.py +483 -0
- package/skills_ref/security-ownership-map/scripts/run_ownership_map.py +200 -0
- package/skills_ref/security-threat-model/LICENSE.txt +201 -0
- package/skills_ref/security-threat-model/SKILL.md +81 -0
- package/skills_ref/security-threat-model/agents/openai.yaml +4 -0
- package/skills_ref/security-threat-model/references/prompt-template.md +255 -0
- package/skills_ref/security-threat-model/references/security-controls-and-assets.md +32 -0
- package/skills_ref/sentry/SKILL.md +123 -0
- package/skills_ref/skill-creator/SKILL.md +372 -0
- package/skills_ref/sora/SKILL.md +153 -0
- package/skills_ref/speech/SKILL.md +144 -0
- package/skills_ref/spotify-player/SKILL.md +64 -0
- package/skills_ref/static-analysis/.claude-plugin/plugin.json +8 -0
- package/skills_ref/static-analysis/README.md +65 -0
- package/skills_ref/static-analysis/agents/semgrep-scanner.md +71 -0
- package/skills_ref/static-analysis/agents/semgrep-triager.md +107 -0
- package/skills_ref/static-analysis/skills/codeql/SKILL.md +119 -0
- package/skills_ref/static-analysis/skills/codeql/references/diagnostic-query-templates.md +339 -0
- package/skills_ref/static-analysis/skills/codeql/references/language-details.md +207 -0
- package/skills_ref/static-analysis/skills/codeql/references/performance-tuning.md +111 -0
- package/skills_ref/static-analysis/skills/codeql/references/ruleset-catalog.md +63 -0
- package/skills_ref/static-analysis/skills/codeql/references/threat-models.md +44 -0
- package/skills_ref/static-analysis/skills/codeql/workflows/build-database.md +669 -0
- package/skills_ref/static-analysis/skills/codeql/workflows/create-data-extensions.md +536 -0
- package/skills_ref/static-analysis/skills/codeql/workflows/run-analysis.md +436 -0
- package/skills_ref/static-analysis/skills/sarif-parsing/SKILL.md +479 -0
- package/skills_ref/static-analysis/skills/sarif-parsing/resources/jq-queries.md +162 -0
- package/skills_ref/static-analysis/skills/sarif-parsing/resources/sarif_helpers.py +331 -0
- package/skills_ref/static-analysis/skills/semgrep/SKILL.md +431 -0
- package/skills_ref/static-analysis/skills/semgrep/references/rulesets.md +162 -0
- package/skills_ref/static-analysis/skills/semgrep/references/scanner-task-prompt.md +102 -0
- package/skills_ref/static-analysis/skills/semgrep/references/triage-task-prompt.md +122 -0
- package/skills_ref/static-analysis/skills/semgrep/scripts/merge_triaged_sarif.py +252 -0
- package/skills_ref/summarize/SKILL.md +87 -0
- package/skills_ref/tdd/SKILL.md +371 -0
- package/skills_ref/tdd/testing-anti-patterns.md +299 -0
- package/skills_ref/telegram-send/SKILL.md +99 -0
- package/skills_ref/terraform/README.md +105 -0
- package/skills_ref/terraform/code-generation/.claude-plugin/plugin.json +30 -0
- package/skills_ref/terraform/code-generation/skills/azure-verified-modules/SKILL.md +613 -0
- package/skills_ref/terraform/code-generation/skills/terraform-style-guide/SKILL.md +353 -0
- package/skills_ref/terraform/code-generation/skills/terraform-test/SKILL.md +1669 -0
- package/skills_ref/terraform/module-generation/.claude-plugin/plugin.json +30 -0
- package/skills_ref/terraform/module-generation/skills/refactor-module/SKILL.md +538 -0
- package/skills_ref/terraform/module-generation/skills/terraform-stacks/SKILL.md +468 -0
- package/skills_ref/terraform/module-generation/skills/terraform-stacks/references/api-monitoring.md +543 -0
- package/skills_ref/terraform/module-generation/skills/terraform-stacks/references/component-blocks.md +476 -0
- package/skills_ref/terraform/module-generation/skills/terraform-stacks/references/deployment-blocks.md +391 -0
- package/skills_ref/terraform/module-generation/skills/terraform-stacks/references/examples.md +1529 -0
- package/skills_ref/terraform/module-generation/skills/terraform-stacks/references/linked-stacks.md +187 -0
- package/skills_ref/terraform/module-generation/skills/terraform-stacks/references/troubleshooting.md +671 -0
- package/skills_ref/terraform/provider-development/.claude-plugin/plugin.json +13 -0
- package/skills_ref/terraform/provider-development/skills/new-terraform-provider/SKILL.md +25 -0
- package/skills_ref/terraform/provider-development/skills/new-terraform-provider/assets/main.go +40 -0
- package/skills_ref/terraform/provider-development/skills/provider-actions/SKILL.md +478 -0
- package/skills_ref/terraform/provider-development/skills/provider-resources/SKILL.md +599 -0
- package/skills_ref/terraform/provider-development/skills/run-acceptance-tests/SKILL.md +41 -0
- package/skills_ref/theme-factory/LICENSE.txt +202 -0
- package/skills_ref/theme-factory/SKILL.md +59 -0
- package/skills_ref/theme-factory/theme-showcase.pdf +0 -0
- package/skills_ref/theme-factory/themes/arctic-frost.md +19 -0
- package/skills_ref/theme-factory/themes/botanical-garden.md +19 -0
- package/skills_ref/theme-factory/themes/desert-rose.md +19 -0
- package/skills_ref/theme-factory/themes/forest-canopy.md +19 -0
- package/skills_ref/theme-factory/themes/golden-hour.md +19 -0
- package/skills_ref/theme-factory/themes/midnight-galaxy.md +19 -0
- package/skills_ref/theme-factory/themes/modern-minimalist.md +19 -0
- package/skills_ref/theme-factory/themes/ocean-depths.md +19 -0
- package/skills_ref/theme-factory/themes/sunset-boulevard.md +19 -0
- package/skills_ref/theme-factory/themes/tech-innovation.md +19 -0
- package/skills_ref/things-mac/SKILL.md +86 -0
- package/skills_ref/tmux/SKILL.md +153 -0
- package/skills_ref/transcribe/SKILL.md +81 -0
- package/skills_ref/trello/SKILL.md +95 -0
- package/skills_ref/tts/SKILL.md +99 -0
- package/skills_ref/vercel-deploy/SKILL.md +115 -0
- package/skills_ref/video-downloader/SKILL.md +99 -0
- package/skills_ref/video-downloader/scripts/download_video.py +145 -0
- package/skills_ref/video-frames/SKILL.md +46 -0
- package/skills_ref/vision-click/SKILL.md +128 -0
- package/skills_ref/weather/SKILL.md +112 -0
- package/skills_ref/web-artifacts-builder/LICENSE.txt +202 -0
- package/skills_ref/web-artifacts-builder/SKILL.md +74 -0
- package/skills_ref/web-artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/skills_ref/web-artifacts-builder/scripts/init-artifact.sh +322 -0
- package/skills_ref/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/skills_ref/web-perf/SKILL.md +193 -0
- package/skills_ref/web-routing/SKILL.md +26 -0
- package/skills_ref/whatsapp/SKILL.md +255 -0
- package/skills_ref/whatsapp/assets/agent-app-integration-example.json +35 -0
- package/skills_ref/whatsapp/assets/databases-example.json +11 -0
- package/skills_ref/whatsapp/assets/function-decide-route-interactive-buttons.json +6 -0
- package/skills_ref/whatsapp/assets/functions-example.json +5 -0
- package/skills_ref/whatsapp/assets/workflow-agent-simple.json +31 -0
- package/skills_ref/whatsapp/assets/workflow-api-template-wait-agent.json +59 -0
- package/skills_ref/whatsapp/assets/workflow-customer-support-intake-agent.json +56 -0
- package/skills_ref/whatsapp/assets/workflow-decision.json +83 -0
- package/skills_ref/whatsapp/assets/workflow-interactive-buttons-decide-ai.json +89 -0
- package/skills_ref/whatsapp/assets/workflow-interactive-buttons-decide-function.json +88 -0
- package/skills_ref/whatsapp/assets/workflow-linear.json +53 -0
- package/skills_ref/whatsapp/package.json +10 -0
- package/skills_ref/whatsapp/references/app-integrations.md +89 -0
- package/skills_ref/whatsapp/references/databases-reference.md +21 -0
- package/skills_ref/whatsapp/references/execution-context.md +42 -0
- package/skills_ref/whatsapp/references/function-contracts.md +55 -0
- package/skills_ref/whatsapp/references/functions-payloads.md +87 -0
- package/skills_ref/whatsapp/references/functions-reference.md +133 -0
- package/skills_ref/whatsapp/references/graph-contract.md +145 -0
- package/skills_ref/whatsapp/references/node-types.md +430 -0
- package/skills_ref/whatsapp/references/triggers.md +20 -0
- package/skills_ref/whatsapp/references/workflow-overview.md +22 -0
- package/skills_ref/whatsapp/references/workflow-reference.md +123 -0
- package/skills_ref/whatsapp/scripts/configure-prop.js +113 -0
- package/skills_ref/whatsapp/scripts/create-connect-token.js +38 -0
- package/skills_ref/whatsapp/scripts/create-function.js +64 -0
- package/skills_ref/whatsapp/scripts/create-integration.js +137 -0
- package/skills_ref/whatsapp/scripts/create-row.js +47 -0
- package/skills_ref/whatsapp/scripts/create-trigger.js +88 -0
- package/skills_ref/whatsapp/scripts/create-workflow.js +85 -0
- package/skills_ref/whatsapp/scripts/delete-integration.js +44 -0
- package/skills_ref/whatsapp/scripts/delete-row.js +49 -0
- package/skills_ref/whatsapp/scripts/delete-trigger.js +44 -0
- package/skills_ref/whatsapp/scripts/deploy-function.js +47 -0
- package/skills_ref/whatsapp/scripts/edit-graph.js +289 -0
- package/skills_ref/whatsapp/scripts/get-action-schema.js +44 -0
- package/skills_ref/whatsapp/scripts/get-context-value.js +80 -0
- package/skills_ref/whatsapp/scripts/get-execution-event.js +55 -0
- package/skills_ref/whatsapp/scripts/get-execution.js +44 -0
- package/skills_ref/whatsapp/scripts/get-function.js +43 -0
- package/skills_ref/whatsapp/scripts/get-graph.js +85 -0
- package/skills_ref/whatsapp/scripts/get-table.js +45 -0
- package/skills_ref/whatsapp/scripts/get-workflow.js +44 -0
- package/skills_ref/whatsapp/scripts/invoke-function.js +60 -0
- package/skills_ref/whatsapp/scripts/lib/databases/args.js +87 -0
- package/skills_ref/whatsapp/scripts/lib/databases/filters.js +30 -0
- package/skills_ref/whatsapp/scripts/lib/databases/kapso-api.js +70 -0
- package/skills_ref/whatsapp/scripts/lib/functions/args.js +55 -0
- package/skills_ref/whatsapp/scripts/lib/functions/kapso-api.js +70 -0
- package/skills_ref/whatsapp/scripts/lib/workflows/args.js +53 -0
- package/skills_ref/whatsapp/scripts/lib/workflows/kapso-api.js +123 -0
- package/skills_ref/whatsapp/scripts/lib/workflows/result.js +16 -0
- package/skills_ref/whatsapp/scripts/list-accounts.js +62 -0
- package/skills_ref/whatsapp/scripts/list-apps.js +42 -0
- package/skills_ref/whatsapp/scripts/list-execution-events.js +61 -0
- package/skills_ref/whatsapp/scripts/list-executions.js +53 -0
- package/skills_ref/whatsapp/scripts/list-function-invocations.js +53 -0
- package/skills_ref/whatsapp/scripts/list-functions.js +41 -0
- package/skills_ref/whatsapp/scripts/list-integrations.js +41 -0
- package/skills_ref/whatsapp/scripts/list-provider-models.js +48 -0
- package/skills_ref/whatsapp/scripts/list-tables.js +41 -0
- package/skills_ref/whatsapp/scripts/list-triggers.js +44 -0
- package/skills_ref/whatsapp/scripts/list-whatsapp-phone-numbers.js +56 -0
- package/skills_ref/whatsapp/scripts/list-workflows.js +44 -0
- package/skills_ref/whatsapp/scripts/openapi-explore.mjs +1273 -0
- package/skills_ref/whatsapp/scripts/query-rows.js +71 -0
- package/skills_ref/whatsapp/scripts/reload-props.js +110 -0
- package/skills_ref/whatsapp/scripts/resume-execution.js +75 -0
- package/skills_ref/whatsapp/scripts/search-actions.js +64 -0
- package/skills_ref/whatsapp/scripts/update-execution-status.js +51 -0
- package/skills_ref/whatsapp/scripts/update-function.js +65 -0
- package/skills_ref/whatsapp/scripts/update-graph.js +154 -0
- package/skills_ref/whatsapp/scripts/update-integration.js +82 -0
- package/skills_ref/whatsapp/scripts/update-row.js +51 -0
- package/skills_ref/whatsapp/scripts/update-trigger.js +60 -0
- package/skills_ref/whatsapp/scripts/update-workflow-settings.js +67 -0
- package/skills_ref/whatsapp/scripts/upsert-row.js +64 -0
- package/skills_ref/whatsapp/scripts/validate-graph.js +293 -0
- package/skills_ref/whatsapp/scripts/variables-delete.js +37 -0
- package/skills_ref/whatsapp/scripts/variables-list.js +55 -0
- package/skills_ref/whatsapp/scripts/variables-set.js +39 -0
- package/skills_ref/writing-plans/SKILL.md +116 -0
- package/skills_ref/xlsx/LICENSE.txt +30 -0
- package/skills_ref/xlsx/SKILL.md +292 -0
- package/skills_ref/xlsx/scripts/office/helpers/__init__.py +0 -0
- package/skills_ref/xlsx/scripts/office/helpers/merge_runs.py +199 -0
- package/skills_ref/xlsx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/skills_ref/xlsx/scripts/office/pack.py +159 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/skills_ref/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/skills_ref/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/skills_ref/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/skills_ref/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/skills_ref/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/skills_ref/xlsx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/skills_ref/xlsx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/skills_ref/xlsx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/skills_ref/xlsx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/skills_ref/xlsx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/skills_ref/xlsx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/skills_ref/xlsx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/skills_ref/xlsx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/skills_ref/xlsx/scripts/office/soffice.py +183 -0
- package/skills_ref/xlsx/scripts/office/unpack.py +132 -0
- package/skills_ref/xlsx/scripts/office/validate.py +111 -0
- package/skills_ref/xlsx/scripts/office/validators/__init__.py +15 -0
- package/skills_ref/xlsx/scripts/office/validators/base.py +847 -0
- package/skills_ref/xlsx/scripts/office/validators/docx.py +446 -0
- package/skills_ref/xlsx/scripts/office/validators/pptx.py +275 -0
- package/skills_ref/xlsx/scripts/office/validators/redlining.py +247 -0
- package/skills_ref/xlsx/scripts/recalc.py +184 -0
- package/skills_ref/xurl/SKILL.md +461 -0
package/skills_ref/security-best-practices/references/javascript-express-web-server-security.md
ADDED
|
@@ -0,0 +1,1158 @@
|
|
|
1
|
+
# Express (Node.js) Web Security Spec (Express 5.x / 4.19.2+, Node.js LTS)
|
|
2
|
+
|
|
3
|
+
This document is designed as a **security spec** that supports:
|
|
4
|
+
|
|
5
|
+
1. **Secure-by-default code generation** for new Express apps and routes.
|
|
6
|
+
2. **Security review / vulnerability hunting** in existing Express code (passive “notice issues while working” and active “scan the repo and report findings”).
|
|
7
|
+
|
|
8
|
+
It is intentionally written as a set of **normative requirements** (“MUST/SHOULD/MAY”) plus **audit rules** (what bad patterns look like, how to detect them, and how to fix/mitigate them).
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 0) Safety, boundaries, and anti-abuse constraints (MUST FOLLOW)
|
|
13
|
+
|
|
14
|
+
* MUST NOT request, output, log, or commit secrets (API keys, passwords, private keys, session secrets, cookies, tokens).
|
|
15
|
+
* MUST NOT “fix” security by disabling protections (e.g., weakening cookie flags, disabling CSRF defenses for cookie-authenticated apps, enabling permissive CORS, trusting proxy headers from the open internet, turning on debugging/stack traces in production, disabling TLS without a replacement).
|
|
16
|
+
* MUST provide **evidence-based findings** during audits: cite file paths, code snippets, middleware/config values, and runtime assumptions that justify the claim.
|
|
17
|
+
* MUST treat uncertainty honestly: if a protection might exist in infrastructure (reverse proxy, gateway, WAF, CDN), report it as “not visible in app code; verify at runtime/config.”
|
|
18
|
+
* MUST prefer vetted libraries and platform controls over “roll your own” crypto/auth/session/CSRF. Express explicitly expects the application to validate/handle user input correctly; it does not do this automatically. ([Express][1])
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 1) Operating modes
|
|
23
|
+
|
|
24
|
+
### 1.1 Generation mode (default)
|
|
25
|
+
|
|
26
|
+
When asked to write new Express code or modify existing code:
|
|
27
|
+
|
|
28
|
+
* MUST follow every **MUST** requirement in this spec.
|
|
29
|
+
* SHOULD follow every **SHOULD** requirement unless the user explicitly says otherwise.
|
|
30
|
+
* MUST prefer safe-by-default APIs and proven libraries over custom security code.
|
|
31
|
+
* MUST avoid introducing new risky sinks (shell execution, dynamic code evaluation, unsafe redirects, serving user files as HTML, template rendering from untrusted strings, unsafe filesystem paths, SSRF URL fetch endpoints, etc.).
|
|
32
|
+
|
|
33
|
+
### 1.2 Passive review mode (always on while editing)
|
|
34
|
+
|
|
35
|
+
While working anywhere in an Express repo (even if the user did not ask for a security scan):
|
|
36
|
+
|
|
37
|
+
* MUST “notice” violations of this spec in touched/nearby code.
|
|
38
|
+
* SHOULD mention issues as they come up, with a brief explanation + safe fix.
|
|
39
|
+
|
|
40
|
+
### 1.3 Active audit mode (explicit scan request)
|
|
41
|
+
|
|
42
|
+
When the user asks to “scan”, “audit”, or “hunt for vulns”:
|
|
43
|
+
|
|
44
|
+
* MUST systematically search the codebase for violations of this spec.
|
|
45
|
+
* MUST output findings in a structured format (see §2.3).
|
|
46
|
+
|
|
47
|
+
Recommended audit order:
|
|
48
|
+
|
|
49
|
+
1. Entrypoints (server/app bootstrap), deployment manifests, Dockerfiles, process manager config, CI/CD.
|
|
50
|
+
2. Express settings + middleware stack order (helmet, parsers, auth, sessions, CSRF, CORS).
|
|
51
|
+
3. Proxy trust (`trust proxy`) and IP/protocol/host handling. ([Express][2])
|
|
52
|
+
4. Auth flows, sessions, cookies, password reset links, redirect handling. ([Express][1])
|
|
53
|
+
5. State-changing routes + CSRF protections (cookie-authenticated apps). ([OWASP Cheat Sheet Series][3])
|
|
54
|
+
6. Template rendering and XSS defenses (HTML generation, CSP, `res.locals`). ([OWASP Cheat Sheet Series][4])
|
|
55
|
+
7. File handling (uploads + downloads + static files) and path traversal. ([Express][5])
|
|
56
|
+
8. Injection classes (SQL, NoSQL, command execution, unsafe deserialization). ([OWASP Cheat Sheet Series][6])
|
|
57
|
+
9. Outbound requests (SSRF) and webhook/callback delivery. ([OWASP Cheat Sheet Series][7])
|
|
58
|
+
10. Rate limiting / brute-force defenses / abuse controls. ([Express][1])
|
|
59
|
+
11. Dependency hygiene / lockfiles / npm audit / vulnerable Express versions. ([Express][1])
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 2) Definitions and review guidance
|
|
64
|
+
|
|
65
|
+
### 2.1 Untrusted input (treat as attacker-controlled unless proven otherwise)
|
|
66
|
+
|
|
67
|
+
In Express, common untrusted inputs include:
|
|
68
|
+
|
|
69
|
+
* `req.params` (route parameters)
|
|
70
|
+
* `req.query` (query string parameters; can be strings/arrays/objects depending on parsing) ([OWASP Cheat Sheet Series][8])
|
|
71
|
+
* `req.body` from `express.json()`, `express.urlencoded()`, `express.text()`, `express.raw()` ([Express][5])
|
|
72
|
+
* `req.headers` / `req.get(...)`
|
|
73
|
+
* `req.cookies` / `req.signedCookies` (if cookie parsing middleware is used)
|
|
74
|
+
* Upload metadata and filenames (e.g., multer `file.originalname`, `file.mimetype`)
|
|
75
|
+
* Any data from external systems (webhooks, third-party APIs, message queues)
|
|
76
|
+
* Any persisted user content (DB rows) that originated from users
|
|
77
|
+
|
|
78
|
+
Special proxy note:
|
|
79
|
+
|
|
80
|
+
* If `trust proxy` is enabled, values like `req.ip`, `req.hostname`, and `req.protocol` may be derived from `X-Forwarded-*` headers which **can be attacker-controlled** if your proxy chain is not correctly overwriting/removing them. ([Express][2])
|
|
81
|
+
|
|
82
|
+
### 2.2 State-changing request
|
|
83
|
+
|
|
84
|
+
A request is state-changing if it can create/update/delete data, change auth/session state, trigger side effects (purchase, email send, webhook send), or initiate privileged actions.
|
|
85
|
+
|
|
86
|
+
### 2.3 Required audit finding format
|
|
87
|
+
|
|
88
|
+
For each issue found, output:
|
|
89
|
+
|
|
90
|
+
* Rule ID:
|
|
91
|
+
* Severity: Critical / High / Medium / Low
|
|
92
|
+
* Location: file path + function/route/middleware name + line(s)
|
|
93
|
+
* Evidence: the exact code/config snippet
|
|
94
|
+
* Impact: what could go wrong, who can exploit it
|
|
95
|
+
* Fix: safe change (prefer minimal diff)
|
|
96
|
+
* Mitigation: defense-in-depth if immediate fix is hard
|
|
97
|
+
* False positive notes: what to verify if uncertain
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## 3) Secure baseline: minimum production configuration (MUST in production)
|
|
102
|
+
|
|
103
|
+
This is the smallest “production baseline” that prevents common Express misconfigurations.
|
|
104
|
+
|
|
105
|
+
Minimum baseline targets:
|
|
106
|
+
|
|
107
|
+
* `helmet()` is used and configured (especially CSP where applicable), and fingerprinting is reduced (disable `x-powered-by`). ([Express][1])
|
|
108
|
+
* A custom 404 handler and a custom error handler exist, and production does not leak internal stack traces. ([Express][1])
|
|
109
|
+
* Cookie/session usage is deliberate:
|
|
110
|
+
|
|
111
|
+
* Not using default session cookie names
|
|
112
|
+
* Cookies use secure attributes (`Secure`, `HttpOnly`, `SameSite`) as appropriate
|
|
113
|
+
* Cookie-backed sessions never store secrets (they are readable by the client)
|
|
114
|
+
* Server-side sessions never use MemoryStore in production. ([Express][1])
|
|
115
|
+
* Request body parsing has explicit limits (`express.json({ limit })`, `express.urlencoded({ limit, parameterLimit, depth })`). ([Express][5])
|
|
116
|
+
* `trust proxy` is configured explicitly to match your proxy topology; not blindly `true`. ([Express][2])
|
|
117
|
+
* Login/auth endpoints have brute-force protection and rate limiting. ([Express][1])
|
|
118
|
+
* Dependencies are regularly audited/updated (`npm audit` + advisory response). ([Express][1])
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## 4) Rules (generation + audit)
|
|
123
|
+
|
|
124
|
+
Each rule contains: required practice, insecure patterns, detection hints, and remediation.
|
|
125
|
+
|
|
126
|
+
### EXPRESS-INPUT-001: Treat all user input as untrusted and validate it
|
|
127
|
+
|
|
128
|
+
Severity: High
|
|
129
|
+
|
|
130
|
+
Required:
|
|
131
|
+
|
|
132
|
+
* MUST validate and normalize untrusted inputs before using them in security-sensitive logic or dangerous sinks (DB queries, redirects, filesystem, HTML output, shell commands). Ensure the untrusted inputs are type checked and structure checked before using or passing forward.
|
|
133
|
+
* SHOULD apply allowlists (known-good) rather than blocklists when feasible.
|
|
134
|
+
* MUST reject or safely handle unexpected types/shapes in `req.query`, `req.params`, and `req.body`.
|
|
135
|
+
|
|
136
|
+
Insecure patterns:
|
|
137
|
+
|
|
138
|
+
* Passing `req.query`, `req.params`, `req.body` directly into database/query builders, redirects, filesystem paths, or templates.
|
|
139
|
+
* Assuming `req.query.foo` is always a string (it can be an array/object depending on parsing). ([OWASP Cheat Sheet Series][8])
|
|
140
|
+
|
|
141
|
+
Detection hints:
|
|
142
|
+
|
|
143
|
+
* Identify “untrusted-to-sink” flows: request → sink (`res.redirect`, SQL execution, `sendFile`, `child_process`, template render, outbound fetch).
|
|
144
|
+
* Search for direct usage of `req.query.*`, `req.body.*`, `req.params.*` in sensitive calls.
|
|
145
|
+
|
|
146
|
+
Fix:
|
|
147
|
+
|
|
148
|
+
* Add schema validation (e.g., zod/joi/express-validator) at route boundaries.
|
|
149
|
+
* Normalize types (e.g., force IDs to integers; reject arrays when scalar expected).
|
|
150
|
+
|
|
151
|
+
Notes:
|
|
152
|
+
|
|
153
|
+
* Express production security guidance explicitly says input validation/handling is the application’s responsibility. ([Express][1])
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
### EXPRESS-REDIRECT-001: Prevent open redirects; validate redirect targets
|
|
158
|
+
|
|
159
|
+
Severity: Medium
|
|
160
|
+
|
|
161
|
+
Required:
|
|
162
|
+
|
|
163
|
+
* MUST validate redirect destinations derived from untrusted input (`next`, `return_to`, `url`).
|
|
164
|
+
* SHOULD allowlist only same-site relative paths (preferred) or a strict allowlist of domains.
|
|
165
|
+
* MUST fall back to a safe default when validation fails.
|
|
166
|
+
|
|
167
|
+
Insecure patterns:
|
|
168
|
+
|
|
169
|
+
* `res.redirect(req.query.next)` with no validation.
|
|
170
|
+
* `res.redirect(req.body.url)` or `res.location(...)` using untrusted URLs.
|
|
171
|
+
|
|
172
|
+
Detection hints:
|
|
173
|
+
|
|
174
|
+
* Search for `res.redirect(` and `res.location(` and trace the source of the target.
|
|
175
|
+
* Look for query params named `next`, `redirect`, `return`, `url`.
|
|
176
|
+
|
|
177
|
+
Fix:
|
|
178
|
+
|
|
179
|
+
* Only allow relative paths (starting with `/`) and disallow `//`, backslashes, and encoded variants.
|
|
180
|
+
* If cross-domain redirects are required, allowlist exact hosts and enforce `https`.
|
|
181
|
+
|
|
182
|
+
Notes:
|
|
183
|
+
|
|
184
|
+
* Express documentation calls out open redirects as dangerous user input and shows validating the host before redirecting. ([Express][1])
|
|
185
|
+
* Keep Express updated: Express has had an open-redirect-related CVE affecting some versions, and upgrades are part of the mitigation posture. ([NVD][9])
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
### EXPRESS-HEADERS-001: Use Helmet (or equivalent) to set essential security headers
|
|
190
|
+
|
|
191
|
+
Severity: Medium
|
|
192
|
+
|
|
193
|
+
Required:
|
|
194
|
+
|
|
195
|
+
* SHOULD use `helmet()` to set common security headers.
|
|
196
|
+
* SHOULD configure CSP realistically (avoid `unsafe-inline` where possible) for pages that render user-influenced content.
|
|
197
|
+
* SHOULD set `X-Content-Type-Options: nosniff`, clickjacking defenses (`X-Frame-Options` or CSP `frame-ancestors`), and appropriate referrer policy.
|
|
198
|
+
|
|
199
|
+
NOTE: It is most important to set the CSP's script-src. All other directives are not as important and can generally be excluded for the ease of development.
|
|
200
|
+
|
|
201
|
+
Insecure patterns:
|
|
202
|
+
|
|
203
|
+
* No security headers set in app code and no evidence they are set at the edge.
|
|
204
|
+
* CSP missing on apps that display user content.
|
|
205
|
+
* Misconfigured framing headers that unintentionally allow clickjacking.
|
|
206
|
+
|
|
207
|
+
Detection hints:
|
|
208
|
+
|
|
209
|
+
* Search for `helmet(` usage; check if CSP is configured or disabled.
|
|
210
|
+
* Search for `res.setHeader(` / `res.set(` for security header setting.
|
|
211
|
+
* If not visible in app code, check nginx/CDN config; otherwise flag “verify at edge.”
|
|
212
|
+
|
|
213
|
+
Fix:
|
|
214
|
+
|
|
215
|
+
* Add `helmet()` early in middleware order and configure:
|
|
216
|
+
|
|
217
|
+
* CSP (`contentSecurityPolicy`)
|
|
218
|
+
* Frame protections (`frameguard` or CSP `frame-ancestors`)
|
|
219
|
+
* `X-Content-Type-Options` (`noSniff`)
|
|
220
|
+
|
|
221
|
+
Notes:
|
|
222
|
+
|
|
223
|
+
* Express production security best practices recommend Helmet and list headers Helmet sets by default. ([Express][1])
|
|
224
|
+
* OWASP HTTP Headers guidance is a useful reference when tuning policies. ([OWASP Cheat Sheet Series][10])
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
### EXPRESS-FINGERPRINT-001: Reduce fingerprinting by disabling `x-powered-by` and customizing error/404 responses
|
|
229
|
+
|
|
230
|
+
Severity: Low (defense-in-depth)
|
|
231
|
+
|
|
232
|
+
Required:
|
|
233
|
+
|
|
234
|
+
* SHOULD disable `X-Powered-By` using `app.disable('x-powered-by')`.
|
|
235
|
+
* SHOULD provide a custom 404 handler and a custom error handler to avoid distinct default responses and to control information leakage.
|
|
236
|
+
|
|
237
|
+
Insecure patterns:
|
|
238
|
+
|
|
239
|
+
* Default `X-Powered-By: Express` header left enabled.
|
|
240
|
+
* Default Express 404/error responses in production with identifiable formatting and/or stack traces.
|
|
241
|
+
|
|
242
|
+
Detection hints:
|
|
243
|
+
|
|
244
|
+
* Search for `app.disable('x-powered-by')`.
|
|
245
|
+
* Check middleware tail for a custom 404 (`app.use((req,res)=>...)`) and a custom error handler (`app.use((err,req,res,next)=>...)`).
|
|
246
|
+
* Check if `NODE_ENV` is correctly set for production behavior (see EXPRESS-ERROR-001). ([Express][11])
|
|
247
|
+
|
|
248
|
+
Fix:
|
|
249
|
+
|
|
250
|
+
* Add:
|
|
251
|
+
|
|
252
|
+
* `app.disable('x-powered-by')`
|
|
253
|
+
* A custom 404 handler
|
|
254
|
+
* A custom error handler that logs server-side and returns generic messages client-side
|
|
255
|
+
|
|
256
|
+
Notes:
|
|
257
|
+
|
|
258
|
+
* Express docs explicitly recommend disabling `x-powered-by` and adding your own not-found and error handlers. ([Express][1])
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
### EXPRESS-COOKIE-001: Cookies must use secure attributes and minimal scope
|
|
263
|
+
|
|
264
|
+
Severity: Medium
|
|
265
|
+
|
|
266
|
+
Required:
|
|
267
|
+
|
|
268
|
+
* MUST set cookie flags appropriately for any authentication/session cookie:
|
|
269
|
+
|
|
270
|
+
* `Secure` when HTTPS (production) IMPORTANT NOTE: Only set `Secure` in production environment if TLS is configured. When running in a local dev environment over HTTP, do not set `Secure` property on cookies. You should do this conditionally based on if the app is running in production mode. You should also include a property like `SESSION_COOKIE_SECURE` which can be used to disable `Secure` cookies when testing over HTTP.
|
|
271
|
+
* `HttpOnly` for auth/session cookies
|
|
272
|
+
* `SameSite` set deliberately (`Lax` is a common baseline; `Strict` if compatible; `None` only with `Secure` and a justified cross-site need)
|
|
273
|
+
* SHOULD avoid setting `domain` broadly (avoid “all subdomains” unless required).
|
|
274
|
+
* SHOULD set bounded expiry appropriate to risk and UX.
|
|
275
|
+
|
|
276
|
+
Insecure patterns:
|
|
277
|
+
|
|
278
|
+
* Session/auth cookies without `HttpOnly`.
|
|
279
|
+
* Cookies without `Secure` in production HTTPS.
|
|
280
|
+
* `SameSite=None` + cookie-authenticated state-changing endpoints without CSRF protections.
|
|
281
|
+
|
|
282
|
+
Detection hints:
|
|
283
|
+
|
|
284
|
+
* Search for `res.cookie(`, `Set-Cookie`, `cookie: { ... }`, `express-session`, `cookie-session`.
|
|
285
|
+
* Verify cookie flags in session middleware configuration.
|
|
286
|
+
|
|
287
|
+
Fix:
|
|
288
|
+
|
|
289
|
+
* Set these attributes centrally in session/cookie middleware configuration.
|
|
290
|
+
|
|
291
|
+
Notes:
|
|
292
|
+
|
|
293
|
+
* Express production security guidance lists cookie security options (`secure`, `httpOnly`, etc.). ([Express][1])
|
|
294
|
+
* `res.cookie()` ultimately sets `Set-Cookie` with options; defaults follow RFC 6265 behavior when options are omitted. ([Express][5])
|
|
295
|
+
* OWASP session management guidance is relevant for choosing flags and lifetimes. ([OWASP Cheat Sheet Series][12])
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
### EXPRESS-SESS-001: Do not use the default session cookie name; avoid session fingerprinting
|
|
300
|
+
|
|
301
|
+
Severity: Low (defense-in-depth)
|
|
302
|
+
|
|
303
|
+
Required:
|
|
304
|
+
|
|
305
|
+
* SHOULD override the default session cookie name (e.g., do not keep `connect.sid` when using `express-session`).
|
|
306
|
+
* SHOULD use a generic name (e.g., `sessionId`) unless you have a compatibility reason.
|
|
307
|
+
|
|
308
|
+
Insecure patterns:
|
|
309
|
+
|
|
310
|
+
* `express-session` used with no `name:` configured (default cookie name).
|
|
311
|
+
* Multiple apps on the same domain sharing a cookie name accidentally.
|
|
312
|
+
|
|
313
|
+
Detection hints:
|
|
314
|
+
|
|
315
|
+
* Search for `express-session` config blocks; check for `name:`.
|
|
316
|
+
|
|
317
|
+
Fix:
|
|
318
|
+
|
|
319
|
+
* Set `name: 'sessionId'` (or similar) in `express-session` options.
|
|
320
|
+
|
|
321
|
+
Notes:
|
|
322
|
+
|
|
323
|
+
* Express docs explicitly recommend not using the default session cookie name to reduce fingerprinting. ([Express][1])
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
### EXPRESS-SESS-002: Session storage and lifecycle must be production-safe
|
|
328
|
+
|
|
329
|
+
Severity: High
|
|
330
|
+
|
|
331
|
+
Required:
|
|
332
|
+
|
|
333
|
+
* MUST NOT use `MemoryStore` in production (it is not designed for production use).
|
|
334
|
+
* MUST store session secrets outside source control and rotate them safely.
|
|
335
|
+
* SHOULD regenerate sessions on login / privilege changes to reduce session fixation risk.
|
|
336
|
+
* MUST NOT store sensitive secrets in client-readable cookie sessions.
|
|
337
|
+
|
|
338
|
+
Insecure patterns:
|
|
339
|
+
|
|
340
|
+
* `app.use(session({ store: new MemoryStore(), ... }))` or missing store (defaults to MemoryStore).
|
|
341
|
+
* Hard-coded for example: `secret: 'keyboard cat'` / `secret: 's3Cur3'` in repo.
|
|
342
|
+
* Using `cookie-session` to store access tokens, refresh tokens, or PII.
|
|
343
|
+
|
|
344
|
+
Detection hints:
|
|
345
|
+
|
|
346
|
+
* Search for `express-session` and look for `MemoryStore` usage or missing `store`.
|
|
347
|
+
* Search for `secret:` in session config and check if it’s hard-coded.
|
|
348
|
+
* Look for `req.session = ...` patterns and whether sensitive data is stored.
|
|
349
|
+
|
|
350
|
+
Fix:
|
|
351
|
+
|
|
352
|
+
* Use a production session store (Redis, database-backed, etc.).
|
|
353
|
+
* Load secrets from environment/secret manager.
|
|
354
|
+
* On login: `req.session.regenerate(...)` or equivalent flow with safe privilege re-binding.
|
|
355
|
+
|
|
356
|
+
Notes:
|
|
357
|
+
|
|
358
|
+
* `express-session` explicitly warns that `MemoryStore` is not designed for production. ([Express][1])
|
|
359
|
+
* `express-session` documents rotating secrets and session regeneration to guard against fixation. ([Express][1])
|
|
360
|
+
* Express notes that cookie-backed sessions serialize data into the cookie and that cookie data is visible to the client; keep it small and non-secret. ([Express][1])
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
### EXPRESS-CSRF-001: Cookie-authenticated state-changing requests MUST be CSRF-protected
|
|
365
|
+
|
|
366
|
+
Severity: High
|
|
367
|
+
|
|
368
|
+
- IMPORTANT NOTE: If cookies are not being used for auth (ie auth is via Authentication header or other passed token), then there is no CSRF risk.
|
|
369
|
+
|
|
370
|
+
Required:
|
|
371
|
+
|
|
372
|
+
* MUST protect all state-changing endpoints (POST/PUT/PATCH/DELETE) that rely on cookies for authentication.
|
|
373
|
+
* SHOULD use a well-understood CSRF mitigation (token-based is the typical baseline).
|
|
374
|
+
* MAY add defense-in-depth: Origin/Referer validation, Fetch Metadata enforcement, SameSite cookies, custom header requirements for XHR/fetch—**but do not treat these as a full replacement** unless explicitly designed and justified.
|
|
375
|
+
* MUST use at a minimum require a custom HTTP header if form based CRSF tokens are not practical, as this is the second strongest method.
|
|
376
|
+
|
|
377
|
+
IMPORTANT NOTE:
|
|
378
|
+
|
|
379
|
+
* If authentication is done via `Authorization: Bearer ...` headers (and not cookies), classic browser CSRF is typically not applicable;
|
|
380
|
+
|
|
381
|
+
Insecure patterns:
|
|
382
|
+
|
|
383
|
+
* Cookie-authenticated endpoints that change state with no CSRF protection.
|
|
384
|
+
* Using GET for state-changing actions (amplifies CSRF risk).
|
|
385
|
+
* “CSRF protection” that only checks a user-controlled field.
|
|
386
|
+
|
|
387
|
+
Detection hints:
|
|
388
|
+
|
|
389
|
+
* Enumerate routes with methods other than GET/HEAD and identify whether cookies gate auth.
|
|
390
|
+
* Look for presence/absence of CSRF middleware and token checks.
|
|
391
|
+
* Check JSON APIs too, not only HTML forms.
|
|
392
|
+
|
|
393
|
+
Fix:
|
|
394
|
+
|
|
395
|
+
* Implement CSRF tokens for cookie-authenticated flows.
|
|
396
|
+
* Add Origin/Referer checks where feasible, and ensure SameSite is set appropriately.
|
|
397
|
+
|
|
398
|
+
Notes:
|
|
399
|
+
|
|
400
|
+
* OWASP CSRF guidance and OWASP Node.js guidance both recommend anti-CSRF tokens as a standard control for web apps. ([OWASP Cheat Sheet Series][3])
|
|
401
|
+
|
|
402
|
+
---
|
|
403
|
+
|
|
404
|
+
### EXPRESS-CORS-001: CORS must be explicit and least-privilege
|
|
405
|
+
|
|
406
|
+
Severity: Medium (High if misconfigured with credentials)
|
|
407
|
+
|
|
408
|
+
Required:
|
|
409
|
+
|
|
410
|
+
* If CORS is not needed, MUST keep it disabled.
|
|
411
|
+
* If CORS is needed:
|
|
412
|
+
|
|
413
|
+
* MUST allowlist trusted origins (do not reflect arbitrary `Origin` without validation).
|
|
414
|
+
* MUST NOT combine broad origins with credentialed cookies (`Access-Control-Allow-Credentials: true`).
|
|
415
|
+
* SHOULD restrict methods, headers, and exposed headers to what’s required.
|
|
416
|
+
|
|
417
|
+
Insecure patterns:
|
|
418
|
+
|
|
419
|
+
* `Access-Control-Allow-Origin: *` with `Access-Control-Allow-Credentials: true`.
|
|
420
|
+
* Reflecting `Origin` for all requests without allowlist validation.
|
|
421
|
+
* Applying permissive CORS middleware globally when only a subset needs cross-origin access.
|
|
422
|
+
|
|
423
|
+
Detection hints:
|
|
424
|
+
|
|
425
|
+
* Search for `cors(`, `Access-Control-Allow-Origin`, `Access-Control-Allow-Credentials`.
|
|
426
|
+
* Inspect whether cookies are used for auth on endpoints exposed cross-origin.
|
|
427
|
+
|
|
428
|
+
Fix:
|
|
429
|
+
|
|
430
|
+
* Implement strict origin allowlist and ensure credentialed requests only for intended origins.
|
|
431
|
+
* Consider splitting CORS config per route group rather than global.
|
|
432
|
+
|
|
433
|
+
Notes:
|
|
434
|
+
|
|
435
|
+
* OWASP HTTP header guidance covers security implications of response headers, including those that affect browser behavior; use it as a reference when reviewing header posture. ([OWASP Cheat Sheet Series][10])
|
|
436
|
+
|
|
437
|
+
---
|
|
438
|
+
|
|
439
|
+
### EXPRESS-PROXY-001: Reverse proxy trust (`trust proxy`) must be configured correctly
|
|
440
|
+
|
|
441
|
+
Severity: Medium (High if using IP based authentication)
|
|
442
|
+
|
|
443
|
+
Required:
|
|
444
|
+
|
|
445
|
+
* If behind a reverse proxy/LB, MUST configure `app.set('trust proxy', ...)` to match the real proxy chain.
|
|
446
|
+
* MUST NOT blindly set `trust proxy = true` unless you fully control the proxy behavior and header rewriting.
|
|
447
|
+
* MUST ensure the last trusted proxy overwrites/removes `X-Forwarded-For`, `X-Forwarded-Host`, and `X-Forwarded-Proto` so clients cannot spoof them.
|
|
448
|
+
|
|
449
|
+
Insecure patterns:
|
|
450
|
+
|
|
451
|
+
* `app.set('trust proxy', true)` in an app directly exposed to the internet or behind unknown proxies.
|
|
452
|
+
* Using `req.ip`, `req.protocol`, `req.hostname` for security decisions without correct proxy trust configuration.
|
|
453
|
+
* Rate limiting keyed by `req.ip` with spoofable forwarded headers.
|
|
454
|
+
|
|
455
|
+
Detection hints:
|
|
456
|
+
|
|
457
|
+
* Search for `app.set('trust proxy'`.
|
|
458
|
+
* Check infra docs (nginx/LB) for header rewriting behavior.
|
|
459
|
+
* Identify any security logic using `req.ip`, `req.ips`, `req.protocol`, `req.hostname`.
|
|
460
|
+
|
|
461
|
+
Fix:
|
|
462
|
+
|
|
463
|
+
* Set `trust proxy` to a hop count, explicit IP/subnet list, or a custom function matching your network.
|
|
464
|
+
* Ensure proxies overwrite forwarded headers.
|
|
465
|
+
|
|
466
|
+
Notes:
|
|
467
|
+
|
|
468
|
+
* Express explicitly warns that when `trust proxy` is `true`, the client IP is derived from `X-Forwarded-For`, and if proxies don’t overwrite forwarded headers, the client can provide any value. It also describes that enabling trust proxy impacts `req.hostname` and `req.protocol` derived from forwarded headers. ([Express][2])
|
|
469
|
+
|
|
470
|
+
---
|
|
471
|
+
|
|
472
|
+
### EXPRESS-BODY-001: Request body size and parsing limits MUST be set appropriately
|
|
473
|
+
|
|
474
|
+
Severity: Low
|
|
475
|
+
|
|
476
|
+
Required:
|
|
477
|
+
|
|
478
|
+
* SHOULD set explicit body size limits for:
|
|
479
|
+
|
|
480
|
+
* `express.json({ limit })`
|
|
481
|
+
* `express.urlencoded({ limit, parameterLimit, depth })`
|
|
482
|
+
* SHOULD only enable the parsers you need; do not parse large bodies by default for all routes.
|
|
483
|
+
* SHOULD enforce additional limits at the reverse proxy / gateway level.
|
|
484
|
+
|
|
485
|
+
Insecure patterns:
|
|
486
|
+
|
|
487
|
+
* No explicit body limits (accepting arbitrarily large JSON/urlencoded).
|
|
488
|
+
* Global parsers applied to all routes when only some need bodies.
|
|
489
|
+
* `parameterLimit` very high without justification (DoS potential).
|
|
490
|
+
|
|
491
|
+
Detection hints:
|
|
492
|
+
|
|
493
|
+
* Search for `express.json(` and confirm `limit` is set (or consciously accepted).
|
|
494
|
+
* Search for `express.urlencoded(` and inspect `limit`, `parameterLimit`, and `depth`.
|
|
495
|
+
* Review upload/webhook endpoints for special parsing needs.
|
|
496
|
+
|
|
497
|
+
Fix:
|
|
498
|
+
|
|
499
|
+
* Configure parsers with conservative defaults and override per route group when needed.
|
|
500
|
+
|
|
501
|
+
Notes:
|
|
502
|
+
|
|
503
|
+
* Express documents `express.json` options (including `limit`, defaulting to 100kb) and explicitly notes `req.body` is untrusted and should be validated. ([Express][5])
|
|
504
|
+
* Express documents `express.urlencoded` options including `limit`, `parameterLimit`, and `depth`. ([Express][5])
|
|
505
|
+
* OWASP Node.js guidance also recommends setting request size limits. ([OWASP Cheat Sheet Series][8])
|
|
506
|
+
|
|
507
|
+
---
|
|
508
|
+
|
|
509
|
+
### EXPRESS-INPUT-002: Prevent HTTP Parameter Pollution and type confusion in `req.query`
|
|
510
|
+
|
|
511
|
+
Severity: Medium
|
|
512
|
+
|
|
513
|
+
Required:
|
|
514
|
+
|
|
515
|
+
* MUST treat `req.query` values as potentially multi-valued (array/object), depending on query parsing.
|
|
516
|
+
* SHOULD reject ambiguous multi-valued parameters for security-sensitive fields (e.g., `role`, `isAdmin`, `redirect`, `amount`, `userId`).
|
|
517
|
+
* SHOULD consider explicit parsing or dedicated middleware if parameter pollution is a concern.
|
|
518
|
+
|
|
519
|
+
Insecure patterns:
|
|
520
|
+
|
|
521
|
+
* `if (req.query.admin) { ... }` without type checks (arrays/objects may coerce truthy).
|
|
522
|
+
* Passing `req.query` directly into ORM/NoSQL query objects.
|
|
523
|
+
|
|
524
|
+
Detection hints:
|
|
525
|
+
|
|
526
|
+
* Search for security-sensitive comparisons on `req.query.*` without type enforcement.
|
|
527
|
+
* Look for code that assumes query params are strings.
|
|
528
|
+
|
|
529
|
+
Fix:
|
|
530
|
+
|
|
531
|
+
* Validate shape: enforce string-only for certain params and reject arrays/objects.
|
|
532
|
+
* Normalize query parsing settings (simple vs extended) where applicable and documented.
|
|
533
|
+
|
|
534
|
+
Notes:
|
|
535
|
+
|
|
536
|
+
* OWASP Node.js cheat sheet explicitly highlights that Express query parsing can produce strings, arrays, or objects and recommends preventing HTTP Parameter Pollution. ([OWASP Cheat Sheet Series][8])
|
|
537
|
+
|
|
538
|
+
---
|
|
539
|
+
|
|
540
|
+
### EXPRESS-XSS-001: Prevent reflected/stored XSS in HTML responses and templating
|
|
541
|
+
|
|
542
|
+
Severity: High
|
|
543
|
+
|
|
544
|
+
Required:
|
|
545
|
+
|
|
546
|
+
* MUST escape untrusted content in HTML output (templates should auto-escape by default; do not bypass).
|
|
547
|
+
* MUST NOT inject untrusted strings into HTML without escaping/sanitization.
|
|
548
|
+
* SHOULD set CSP (via Helmet) for apps rendering user-controlled content.
|
|
549
|
+
* SHOULD keep `res.locals` free of user-controlled input intended for templates unless it is validated/escaped.
|
|
550
|
+
|
|
551
|
+
Insecure patterns:
|
|
552
|
+
|
|
553
|
+
* `res.send("<div>" + req.query.q + "</div>")`
|
|
554
|
+
* Passing untrusted HTML through “safe” template flags/filters.
|
|
555
|
+
* Writing untrusted strings into `res.locals` and then rendering without escaping.
|
|
556
|
+
|
|
557
|
+
Detection hints:
|
|
558
|
+
|
|
559
|
+
* Search for `res.send(` with strings containing user input.
|
|
560
|
+
* Search for template “safe” flags (engine-specific) and trace data origin.
|
|
561
|
+
* Search for assignments to `res.locals` and whether they might contain untrusted data.
|
|
562
|
+
|
|
563
|
+
Fix:
|
|
564
|
+
|
|
565
|
+
* Use a template engine with autoescaping; pass only validated data.
|
|
566
|
+
* For rich text that must contain HTML, use a trusted sanitizer and an allowlist policy.
|
|
567
|
+
* Add CSP with realistic directives.
|
|
568
|
+
|
|
569
|
+
Notes:
|
|
570
|
+
|
|
571
|
+
* Express API docs explicitly warn that `res.locals` “should not contain user-controlled input” and is often used to expose things like CSRF tokens to templates. ([Express][5])
|
|
572
|
+
* OWASP XSS prevention guidance provides standard output-encoding and policy recommendations. ([OWASP Cheat Sheet Series][4])
|
|
573
|
+
* Helmet can mitigate some XSS classes via headers such as CSP. ([Express][1])
|
|
574
|
+
|
|
575
|
+
---
|
|
576
|
+
|
|
577
|
+
### EXPRESS-TEMPLATE-001: Never render untrusted templates or template paths (SSTI / LFI risk)
|
|
578
|
+
|
|
579
|
+
Severity: Critical (if you can prove template strings/paths are user/attacker-controlled)
|
|
580
|
+
|
|
581
|
+
Required:
|
|
582
|
+
|
|
583
|
+
* MUST NOT render templates whose contents or template path/name is influenced by untrusted input.
|
|
584
|
+
* MUST NOT load templates from user-controlled filesystem locations.
|
|
585
|
+
* SHOULD treat “email template editors”, “theme engines”, and “CMS-like template storage” as high-risk designs requiring sandboxing and isolation.
|
|
586
|
+
|
|
587
|
+
Insecure patterns:
|
|
588
|
+
|
|
589
|
+
* `res.render(req.query.view, data)` where `view` is not allowlisted.
|
|
590
|
+
* Rendering a template from a string that includes user input (engine-specific).
|
|
591
|
+
* Loading templates from uploads directories.
|
|
592
|
+
|
|
593
|
+
Detection hints:
|
|
594
|
+
|
|
595
|
+
* Search for `res.render(` where the first argument is derived from request/DB without allowlist.
|
|
596
|
+
* Search for template compilation APIs (engine-specific) fed by user content.
|
|
597
|
+
|
|
598
|
+
Fix:
|
|
599
|
+
|
|
600
|
+
* Use allowlisted template names and a fixed templates directory.
|
|
601
|
+
* If user-defined templates are required, implement strict sandboxing and isolate execution.
|
|
602
|
+
|
|
603
|
+
Notes:
|
|
604
|
+
|
|
605
|
+
* Express’s template system depends on the chosen engine; assume unsafe if user input influences template selection or source.
|
|
606
|
+
|
|
607
|
+
---
|
|
608
|
+
|
|
609
|
+
### EXPRESS-FILES-001: Prevent path traversal and unsafe file serving (sendFile/download)
|
|
610
|
+
|
|
611
|
+
Severity: High
|
|
612
|
+
|
|
613
|
+
Required:
|
|
614
|
+
|
|
615
|
+
* MUST NOT pass user-controlled filesystem paths directly to `res.sendFile()` / `res.download()` / filesystem APIs.
|
|
616
|
+
* SHOULD use `res.sendFile` with a fixed `root` and strict options (e.g., deny dotfiles) when serving user-selected files from a directory.
|
|
617
|
+
* MUST enforce authorization checks before serving user-specific files.
|
|
618
|
+
|
|
619
|
+
Insecure patterns:
|
|
620
|
+
|
|
621
|
+
* `res.sendFile(req.query.path)` or `res.download(req.params.file)` with no root restriction.
|
|
622
|
+
* File-serving routes that accept `..` segments, encoded traversal, or absolute paths.
|
|
623
|
+
|
|
624
|
+
Detection hints:
|
|
625
|
+
|
|
626
|
+
* Search for `res.sendFile(` and trace the `path` argument origin.
|
|
627
|
+
* Search for `res.download(` and trace the `path` argument origin.
|
|
628
|
+
* Look for `fs.readFile`/`createReadStream` on paths derived from requests.
|
|
629
|
+
|
|
630
|
+
Fix:
|
|
631
|
+
|
|
632
|
+
* Use an identifier-to-path mapping stored server-side (DB), not raw paths from clients.
|
|
633
|
+
* Use `root: <trusted_base_dir>` and `dotfiles: 'deny'` where appropriate; validate the filename component strictly.
|
|
634
|
+
|
|
635
|
+
Notes:
|
|
636
|
+
|
|
637
|
+
* Express’s `res.sendFile` docs show using a `root` option and `dotfiles: 'deny'` as part of a safe serving configuration. ([Express][5])
|
|
638
|
+
* `res.download` transfers the file as an attachment, but you still must control/validate the underlying `path`. ([Express][5])
|
|
639
|
+
|
|
640
|
+
---
|
|
641
|
+
|
|
642
|
+
### EXPRESS-STATIC-001: Harden `express.static` / serve-static and never serve untrusted uploads as active content
|
|
643
|
+
|
|
644
|
+
Severity: Medium (if serving untrusted user files if there are not robust limits tot eh file extensions)
|
|
645
|
+
|
|
646
|
+
Required:
|
|
647
|
+
|
|
648
|
+
* MUST NOT serve user uploads from a public static directory as active content (especially HTML/JS/SVG) unless explicitly intended and sandboxed. If sure that the content is inactive (png, jpg, other images etc) then it may be safe. It may be good to validate image file extensions are allow-listed before serving them.
|
|
649
|
+
* SHOULD configure static serving to:
|
|
650
|
+
|
|
651
|
+
* deny/ignore dotfiles
|
|
652
|
+
* avoid unintended directory indexes if not needed
|
|
653
|
+
* apply appropriate cache controls for immutable assets
|
|
654
|
+
|
|
655
|
+
Insecure patterns:
|
|
656
|
+
|
|
657
|
+
* `app.use(express.static('uploads'))` where users can upload arbitrary files.
|
|
658
|
+
* Serving uploaded HTML or SVG inline from the same origin as the app.
|
|
659
|
+
|
|
660
|
+
Detection hints:
|
|
661
|
+
|
|
662
|
+
* Search for `express.static(` and identify served directories.
|
|
663
|
+
* Compare served directories with upload storage locations.
|
|
664
|
+
* Check for `dotfiles` and `index` options in static middleware.
|
|
665
|
+
|
|
666
|
+
Fix:
|
|
667
|
+
|
|
668
|
+
* Store uploads outside any static web root and serve via controlled routes that set safe `Content-Type` and `Content-Disposition: attachment` when appropriate.
|
|
669
|
+
* Configure `express.static(root, { dotfiles: 'deny'|'ignore', index: false (if desired) })`.
|
|
670
|
+
|
|
671
|
+
Notes:
|
|
672
|
+
|
|
673
|
+
* Express documents `express.static` options, including `dotfiles` behavior and `index`. ([Express][5])
|
|
674
|
+
|
|
675
|
+
---
|
|
676
|
+
|
|
677
|
+
### EXPRESS-UPLOAD-001: File uploads must be validated, stored safely, and served safely
|
|
678
|
+
|
|
679
|
+
Severity: Low - Medium
|
|
680
|
+
|
|
681
|
+
Required:
|
|
682
|
+
|
|
683
|
+
* SHOULD enforce upload size limits (app + edge).
|
|
684
|
+
* MUST validate file type using allowlists and content checks (not only filename extension).
|
|
685
|
+
* MUST store uploads outside executable/static roots when possible.
|
|
686
|
+
* SHOULD generate server-side filenames (random IDs); do not trust original names.
|
|
687
|
+
* MUST serve potentially active formats safely (download attachment) unless explicitly intended.
|
|
688
|
+
|
|
689
|
+
Insecure patterns:
|
|
690
|
+
|
|
691
|
+
* Accepting arbitrary file types and serving them back inline.
|
|
692
|
+
* Using `file.originalname` as the storage path.
|
|
693
|
+
* Missing size/type validation.
|
|
694
|
+
|
|
695
|
+
Detection hints:
|
|
696
|
+
|
|
697
|
+
* Look for multer/busboy/formidable usage and check for `limits`.
|
|
698
|
+
* Check where uploaded files are written and how they are served.
|
|
699
|
+
* Check whether uploads end up under `public/` or any `express.static` root.
|
|
700
|
+
|
|
701
|
+
Fix:
|
|
702
|
+
|
|
703
|
+
* Implement allowlist validation + safe storage + safe serving, per OWASP upload guidance.
|
|
704
|
+
|
|
705
|
+
Notes:
|
|
706
|
+
|
|
707
|
+
* OWASP File Upload guidance covers allowlists, content validation, storage, and safe serving patterns. ([OWASP Cheat Sheet Series][13])
|
|
708
|
+
|
|
709
|
+
---
|
|
710
|
+
|
|
711
|
+
### EXPRESS-INJECT-001: Prevent SQL injection (use parameterized queries / ORM)
|
|
712
|
+
|
|
713
|
+
Severity: High
|
|
714
|
+
|
|
715
|
+
Required:
|
|
716
|
+
|
|
717
|
+
* MUST use parameterized queries or an ORM/query builder that parameterizes under the hood.
|
|
718
|
+
* MUST NOT build SQL via string concatenation/template literals with untrusted input.
|
|
719
|
+
|
|
720
|
+
Insecure patterns:
|
|
721
|
+
|
|
722
|
+
* ``db.query(`SELECT * FROM users WHERE id = ${req.query.id}`)``
|
|
723
|
+
* `"SELECT ... WHERE name = '" + req.body.name + "'"`
|
|
724
|
+
|
|
725
|
+
Detection hints:
|
|
726
|
+
|
|
727
|
+
* Grep for `SELECT`, `INSERT`, `UPDATE`, `DELETE` strings in JS/TS.
|
|
728
|
+
* Trace untrusted input into `.query(...)`, `.execute(...)`, or raw SQL APIs.
|
|
729
|
+
|
|
730
|
+
Fix:
|
|
731
|
+
|
|
732
|
+
* Replace with parameterized queries (placeholders) or ORM query APIs.
|
|
733
|
+
* Validate types (e.g., integer IDs) before querying.
|
|
734
|
+
|
|
735
|
+
Notes:
|
|
736
|
+
|
|
737
|
+
* OWASP SQL injection prevention guidance strongly favors parameterized queries. ([OWASP Cheat Sheet Series][6])
|
|
738
|
+
|
|
739
|
+
---
|
|
740
|
+
|
|
741
|
+
### EXPRESS-INJECT-002: Prevent NoSQL injection / operator injection (Mongo-style)
|
|
742
|
+
|
|
743
|
+
Severity: High (app-dependent)
|
|
744
|
+
|
|
745
|
+
Required:
|
|
746
|
+
|
|
747
|
+
* MUST validate types and schemas for any query object built from untrusted input.
|
|
748
|
+
* MUST prevent operator injection (e.g., `$ne`, `$gt`, `$where`) if user input is merged into query objects.
|
|
749
|
+
* SHOULD consider defensive libraries/middleware when appropriate.
|
|
750
|
+
|
|
751
|
+
Insecure patterns:
|
|
752
|
+
|
|
753
|
+
* `collection.find(req.body)` where the body is attacker-controlled.
|
|
754
|
+
* Merging `req.query`/`req.body` into Mongo queries without schema validation.
|
|
755
|
+
|
|
756
|
+
Detection hints:
|
|
757
|
+
|
|
758
|
+
* Search for `find(`, `findOne(`, `aggregate(` calls where argument is request-derived.
|
|
759
|
+
* Check for patterns like `{ ...req.query }` or `Object.assign(query, req.body)`.
|
|
760
|
+
|
|
761
|
+
Fix:
|
|
762
|
+
|
|
763
|
+
* Use schema validation at boundary; explicitly construct query objects from validated fields only.
|
|
764
|
+
|
|
765
|
+
Notes:
|
|
766
|
+
|
|
767
|
+
* OWASP Node.js cheat sheet discusses input validation and mentions Node ecosystem modules commonly used for sanitization in NoSQL contexts. ([OWASP Cheat Sheet Series][8])
|
|
768
|
+
|
|
769
|
+
---
|
|
770
|
+
|
|
771
|
+
### EXPRESS-CMD-001: Prevent OS command injection (child_process)
|
|
772
|
+
|
|
773
|
+
Severity: Critical to High (depends on exposure), please prove it is user/attacker controlled
|
|
774
|
+
|
|
775
|
+
Required:
|
|
776
|
+
|
|
777
|
+
* MUST avoid executing shell commands with untrusted input.
|
|
778
|
+
* If subprocess is necessary:
|
|
779
|
+
|
|
780
|
+
* MUST avoid `exec()` / `execSync()` with attacker-influenced strings
|
|
781
|
+
* MUST NOT use `shell: true` with attacker-influenced data
|
|
782
|
+
* SHOULD use `spawn()` with an argument array and strict allowlists. Ensure the executable is hardcoded or allow-listed, do not use a user supplied command name.
|
|
783
|
+
* SHOULD place user-controlled values after `--` when supported by the subcommand to avoid flag injection
|
|
784
|
+
|
|
785
|
+
Insecure patterns:
|
|
786
|
+
|
|
787
|
+
* `exec(req.query.cmd)`
|
|
788
|
+
* `exec(`convert ${userPath} ...`)`
|
|
789
|
+
* `spawn('sh', ['-c', userString])`
|
|
790
|
+
* `spawn(userString, ['foo'])`
|
|
791
|
+
|
|
792
|
+
Detection hints:
|
|
793
|
+
|
|
794
|
+
* Search for `child_process`, `exec(`, `execSync(`, `spawn(`, `fork(`.
|
|
795
|
+
* Trace request/DB data into command construction.
|
|
796
|
+
|
|
797
|
+
Fix:
|
|
798
|
+
|
|
799
|
+
* If possible, write the functionality in javascript or use a library instead of subprocess.
|
|
800
|
+
* If unavoidable, hard-code command and strictly allowlist parameters.
|
|
801
|
+
|
|
802
|
+
Notes:
|
|
803
|
+
|
|
804
|
+
* OWASP OS command injection defense guidance covers avoid-shell and allowlist patterns. ([OWASP Cheat Sheet Series][14])
|
|
805
|
+
|
|
806
|
+
---
|
|
807
|
+
|
|
808
|
+
### EXPRESS-SSRF-001: Prevent server-side request forgery (SSRF) in outbound HTTP
|
|
809
|
+
|
|
810
|
+
Severity: Medium (High in cloud/LAN deployments)
|
|
811
|
+
|
|
812
|
+
NOTE: This is mostly only applicable to apps which will be deployed in a cloud/LAN setup or have other http services on the same box. Sometimes the feature requires this functionality unavoidably (webhooks).
|
|
813
|
+
|
|
814
|
+
Required:
|
|
815
|
+
|
|
816
|
+
* MUST treat outbound requests to user-provided URLs as high risk if there are other reachable private http endpoints.
|
|
817
|
+
* SHOULD validate and restrict destinations (allowlist hosts/domains) for any user-influenced URL fetch.
|
|
818
|
+
* SHOULD block access to:
|
|
819
|
+
|
|
820
|
+
* localhost / private IP ranges / link-local
|
|
821
|
+
* cloud metadata endpoints
|
|
822
|
+
* MUST allow only `http`/`https` for URL fetch features (to avoid schemas such as `file:`,`javascript:`)
|
|
823
|
+
* SHOULD set timeouts and restrict redirects.
|
|
824
|
+
|
|
825
|
+
Insecure patterns:
|
|
826
|
+
|
|
827
|
+
* `fetch(req.query.url)`
|
|
828
|
+
* “URL preview” / “import from URL” endpoints that accept arbitrary URLs.
|
|
829
|
+
|
|
830
|
+
Detection hints:
|
|
831
|
+
|
|
832
|
+
* Search for `fetch(`, `axios(`, `got(`, `request(`, `node-fetch` usage where URL originates from users/DB.
|
|
833
|
+
* Review webhook testers, previewers, image fetchers.
|
|
834
|
+
|
|
835
|
+
Fix:
|
|
836
|
+
|
|
837
|
+
* Enforce scheme allowlist, host allowlist, DNS/IP resolution checks, timeouts, and redirect policy.
|
|
838
|
+
* Consider network egress controls at infrastructure level.
|
|
839
|
+
|
|
840
|
+
Notes:
|
|
841
|
+
|
|
842
|
+
* OWASP SSRF prevention guidance provides standard controls and common pitfalls. ([OWASP Cheat Sheet Series][7])
|
|
843
|
+
|
|
844
|
+
---
|
|
845
|
+
|
|
846
|
+
### EXPRESS-ERROR-001: Error handling MUST not leak sensitive details in production
|
|
847
|
+
|
|
848
|
+
Severity: Low
|
|
849
|
+
|
|
850
|
+
Required:
|
|
851
|
+
|
|
852
|
+
* SHOULD define a centralized error handler (`app.use((err, req, res, next) => ...)`) at the end of middleware.
|
|
853
|
+
* MUST avoid returning stack traces, internal error messages, or secrets to clients in production.
|
|
854
|
+
* SHOULD log errors server-side with appropriate redaction.
|
|
855
|
+
* SHOULD ensure the app runs with production settings so default behavior doesn’t leak details.
|
|
856
|
+
* MUST avoid logging or returning sensitive information such as secrets, env vars, sessions, cookies in error messages in production.
|
|
857
|
+
|
|
858
|
+
Insecure patterns:
|
|
859
|
+
|
|
860
|
+
* Returning `err.stack` to clients.
|
|
861
|
+
* Using dev-only error middleware in production.
|
|
862
|
+
* `NODE_ENV` left as development, causing verbose error responses.
|
|
863
|
+
|
|
864
|
+
Detection hints:
|
|
865
|
+
|
|
866
|
+
* Verify there is a final error-handling middleware.
|
|
867
|
+
* Search for `res.status(500).send(err)` or similar.
|
|
868
|
+
* Check production environment variables and startup scripts.
|
|
869
|
+
|
|
870
|
+
Fix:
|
|
871
|
+
|
|
872
|
+
* Add a production-safe error handler that returns generic messages and logs details internally.
|
|
873
|
+
* Ensure environment is configured for production behavior.
|
|
874
|
+
|
|
875
|
+
Notes:
|
|
876
|
+
|
|
877
|
+
* Express production security guidance recommends custom error handling. ([Express][1])
|
|
878
|
+
* Express error handling docs describe the default error handler behavior and how production mode affects what is exposed. ([Express][11])
|
|
879
|
+
|
|
880
|
+
---
|
|
881
|
+
|
|
882
|
+
### EXPRESS-AUTH-001: Prevent brute-force attacks against authorization endpoints
|
|
883
|
+
|
|
884
|
+
Severity: Medium
|
|
885
|
+
|
|
886
|
+
NOTE: This is highly application specific and while it is good to bring to the attention of the user, it is hard to fix without additional complex configurations. Prefer to inform the user and if they request you to help implement a solution, help walk them through possible solutions.
|
|
887
|
+
|
|
888
|
+
Required:
|
|
889
|
+
|
|
890
|
+
* SHOULD protect login/auth endpoints against brute forcing.
|
|
891
|
+
* SHOULD rate-limit by:
|
|
892
|
+
|
|
893
|
+
1. consecutive failed attempts per username+IP
|
|
894
|
+
2. failed attempts per IP over a time window
|
|
895
|
+
|
|
896
|
+
Insecure patterns:
|
|
897
|
+
|
|
898
|
+
* Unlimited login attempts.
|
|
899
|
+
|
|
900
|
+
Detection hints:
|
|
901
|
+
|
|
902
|
+
* Identify all auth endpoints and check for rate limiting/throttling.
|
|
903
|
+
* Search for `rate-limiter-flexible`, `express-rate-limit`, or gateway policies.
|
|
904
|
+
|
|
905
|
+
Fix:
|
|
906
|
+
|
|
907
|
+
* Implement rate-limiting/throttling (app or edge). Express docs point to `rate-limiter-flexible` as a tool for this approach. ([Express][1])
|
|
908
|
+
|
|
909
|
+
Notes:
|
|
910
|
+
|
|
911
|
+
* OWASP Node.js cheat sheet also recommends precautions against brute forcing. ([OWASP Cheat Sheet Series][8])
|
|
912
|
+
|
|
913
|
+
---
|
|
914
|
+
|
|
915
|
+
### EXPRESS-DEPS-001: Dependency and patch hygiene (Express + Node + critical middleware)
|
|
916
|
+
|
|
917
|
+
Severity: Medium / Low
|
|
918
|
+
|
|
919
|
+
NOTE: `npm audit` often returns a large number of insignificant "vulnerabilities" which do not actually matter. You should only focus on Express or other extremely critical packages, ignoring ones listed in dev tools, bundlers, etc.
|
|
920
|
+
|
|
921
|
+
Do not upgrade packages without concent from the user. This may break existing code in unexpected ways. Instead, inform them of the outdated packages.
|
|
922
|
+
|
|
923
|
+
Required:
|
|
924
|
+
|
|
925
|
+
* MUST keep Express on a maintained version line (avoid EOL major versions).
|
|
926
|
+
* MAY use `npm audit` in CI and during maintenance work.
|
|
927
|
+
* SHOULD pin dependencies via lockfiles and review major updates carefully.
|
|
928
|
+
|
|
929
|
+
Insecure patterns:
|
|
930
|
+
|
|
931
|
+
* Running EOL Express versions (e.g., very old major lines).
|
|
932
|
+
* Ignoring `npm audit` findings without triage.
|
|
933
|
+
* Unpinned dependency ranges that auto-upgrade into insecure versions.
|
|
934
|
+
|
|
935
|
+
Detection hints:
|
|
936
|
+
|
|
937
|
+
* Check `package.json` and lockfiles for `express` version and other critical middleware versions.
|
|
938
|
+
* Inspect CI pipelines for `npm audit`/SCA steps.
|
|
939
|
+
|
|
940
|
+
Fix:
|
|
941
|
+
|
|
942
|
+
* Upgrade to latest stable Express and apply patches.
|
|
943
|
+
* Add automated dependency scanning and upgrade process.
|
|
944
|
+
|
|
945
|
+
Notes:
|
|
946
|
+
|
|
947
|
+
* Express production security guidance emphasizes that dependency vulnerabilities can compromise the app, and recommends `npm audit`. ([Express][1])
|
|
948
|
+
* Track security issues affecting Express versions (including known open-redirect-related CVEs). ([NVD][9])
|
|
949
|
+
|
|
950
|
+
---
|
|
951
|
+
|
|
952
|
+
### EXPRESS-DOS-001: Configure DoS protections (timeouts, limits, reverse proxy)
|
|
953
|
+
|
|
954
|
+
Severity: Low
|
|
955
|
+
|
|
956
|
+
NOTE: It may be hard to tell from the provided application context if the application runs behind a reverse proxy. You can inform the user or recommend one, but do not attempt to configure one without them initiating it. This is highly deployment dependant.
|
|
957
|
+
|
|
958
|
+
Required:
|
|
959
|
+
|
|
960
|
+
* SHOULD use a reverse proxy to provide caching, load balancing, and filtering controls when feasible.
|
|
961
|
+
* MAY configure server/proxy timeouts and connection limits to reduce exposure to Slowloris and similar DoS patterns.
|
|
962
|
+
* MUST ensure server/socket errors are handled so malformed connections do not crash the process. (Express should handle exceptions, but there are edgecases)
|
|
963
|
+
|
|
964
|
+
Insecure patterns:
|
|
965
|
+
|
|
966
|
+
* No reverse proxy in front of a public Node server, with defaults everywhere.
|
|
967
|
+
* Missing error handlers on server/socket objects.
|
|
968
|
+
* Extremely permissive timeouts and unlimited body sizes.
|
|
969
|
+
|
|
970
|
+
Detection hints:
|
|
971
|
+
|
|
972
|
+
* Inspect server creation (`http.createServer`, `https.createServer`) and whether timeouts are set.
|
|
973
|
+
* Check proxy/gateway config for timeouts and max body size.
|
|
974
|
+
|
|
975
|
+
Fix:
|
|
976
|
+
|
|
977
|
+
* Explain how to configure reverse proxy and timeouts, set request size limits
|
|
978
|
+
* add robust error handling middleware
|
|
979
|
+
|
|
980
|
+
Notes:
|
|
981
|
+
|
|
982
|
+
* Node’s security guidance for HTTP DoS discusses using reverse proxies and correctly configuring server timeouts. ([Node.js][15])
|
|
983
|
+
|
|
984
|
+
---
|
|
985
|
+
|
|
986
|
+
### EXPRESS-NODE-INSPECT-001: Do not expose the Node inspector in production
|
|
987
|
+
|
|
988
|
+
Severity: Critical
|
|
989
|
+
|
|
990
|
+
NOTE: Ensure that this detection is actually in the production path, and not just being used for local debugging.
|
|
991
|
+
|
|
992
|
+
Required:
|
|
993
|
+
|
|
994
|
+
* MUST NOT run Node with `--inspect` (especially bound to non-loopback) in production.
|
|
995
|
+
* MUST ensure `NODE_OPTIONS` or startup scripts do not enable inspector in prod.
|
|
996
|
+
* SHOULD firewall/debug locally only.
|
|
997
|
+
|
|
998
|
+
Insecure patterns:
|
|
999
|
+
|
|
1000
|
+
* `node --inspect=0.0.0.0:9229 app.js` in production.
|
|
1001
|
+
* Container/PM2/systemd configs enabling inspector.
|
|
1002
|
+
|
|
1003
|
+
Detection hints:
|
|
1004
|
+
|
|
1005
|
+
* Search for `--inspect` in Dockerfiles, Procfiles, systemd units, PM2 configs, npm scripts.
|
|
1006
|
+
* Check `NODE_OPTIONS`.
|
|
1007
|
+
|
|
1008
|
+
Fix:
|
|
1009
|
+
|
|
1010
|
+
* Remove inspector flags from production start commands; restrict to local dev.
|
|
1011
|
+
|
|
1012
|
+
Notes:
|
|
1013
|
+
|
|
1014
|
+
* Node security guidance discusses inspector exposure risks (e.g., DNS rebinding) and recommends not running inspector in production. ([Node.js][15])
|
|
1015
|
+
|
|
1016
|
+
---
|
|
1017
|
+
|
|
1018
|
+
### EXPRESS-NODE-HTTP-001: Do not enable insecure HTTP parsing in production
|
|
1019
|
+
|
|
1020
|
+
Severity: High
|
|
1021
|
+
|
|
1022
|
+
NOTE: Ensure that this detection is actually in the production path, and not just being used for local dev.
|
|
1023
|
+
|
|
1024
|
+
Required:
|
|
1025
|
+
|
|
1026
|
+
* MUST NOT use Node’s `insecureHTTPParser` in production.
|
|
1027
|
+
* MAY suggest configuring front-end proxies to normalize ambiguous requests to reduce request smuggling risk.
|
|
1028
|
+
|
|
1029
|
+
Insecure patterns:
|
|
1030
|
+
|
|
1031
|
+
* Creating an HTTP server with `{ insecureHTTPParser: true }`.
|
|
1032
|
+
|
|
1033
|
+
Detection hints:
|
|
1034
|
+
|
|
1035
|
+
* Search for `insecureHTTPParser` in server creation code.
|
|
1036
|
+
|
|
1037
|
+
Fix:
|
|
1038
|
+
|
|
1039
|
+
* Remove insecure parsing; rely on spec-compliant parsing and normalize at the edge.
|
|
1040
|
+
|
|
1041
|
+
Notes:
|
|
1042
|
+
|
|
1043
|
+
* Node security guidance explicitly recommends not using `insecureHTTPParser`. ([Node.js][15])
|
|
1044
|
+
|
|
1045
|
+
---
|
|
1046
|
+
|
|
1047
|
+
## 5) Practical scanning heuristics (how to “hunt”)
|
|
1048
|
+
|
|
1049
|
+
When actively scanning an Express repo, these patterns are high-signal:
|
|
1050
|
+
|
|
1051
|
+
* TLS / transport:
|
|
1052
|
+
|
|
1053
|
+
* `app.listen(80` without reverse proxy mention; missing `helmet`; cookies missing `secure` ([Express][1]) (NOTE this only applies to web facing applications, internal apps likely won't have TLS)
|
|
1054
|
+
* Proxy trust:
|
|
1055
|
+
|
|
1056
|
+
* `app.set('trust proxy', true)`; logic using `req.ip`/`req.protocol`/`req.hostname` ([Express][2])
|
|
1057
|
+
* Security headers / fingerprinting:
|
|
1058
|
+
|
|
1059
|
+
* missing `helmet(`; missing `app.disable('x-powered-by')` ([Express][1])
|
|
1060
|
+
* Cookies / sessions:
|
|
1061
|
+
|
|
1062
|
+
* `express-session` with missing `store` (MemoryStore risk), hard-coded `secret:`, missing `cookie: { secure/httpOnly/sameSite }` ([Express][1])
|
|
1063
|
+
* `cookie-session` storing large objects or secrets ([Express][1])
|
|
1064
|
+
* Body parsing limits:
|
|
1065
|
+
|
|
1066
|
+
* `express.json()` or `express.urlencoded()` without `limit`/`parameterLimit`/`depth` ([Express][5])
|
|
1067
|
+
* CSRF:
|
|
1068
|
+
|
|
1069
|
+
* POST/PUT/PATCH/DELETE routes using cookie auth with no CSRF tokens/origin checks ([OWASP Cheat Sheet Series][3])
|
|
1070
|
+
* Open redirects:
|
|
1071
|
+
|
|
1072
|
+
* `res.redirect(req.query.next)` or similar ([Express][1])
|
|
1073
|
+
* XSS / HTML output:
|
|
1074
|
+
|
|
1075
|
+
* `res.send(` building HTML with user input; template “safe” flags; untrusted values in `res.locals` ([Express][5])
|
|
1076
|
+
* File handling:
|
|
1077
|
+
|
|
1078
|
+
* `res.sendFile(` / `res.download(` where path originates from request; `express.static('uploads')` ([Express][5])
|
|
1079
|
+
* Injection:
|
|
1080
|
+
|
|
1081
|
+
* SQL strings + template literals into DB calls ([OWASP Cheat Sheet Series][6])
|
|
1082
|
+
* `child_process.exec` / `execSync` / `shell: true` ([OWASP Cheat Sheet Series][14])
|
|
1083
|
+
* SSRF:
|
|
1084
|
+
|
|
1085
|
+
* outbound `fetch/axios/got` to user-provided URLs ([OWASP Cheat Sheet Series][7])
|
|
1086
|
+
* Brute force / abuse:
|
|
1087
|
+
|
|
1088
|
+
* auth endpoints lacking throttling; no rate limiting middleware ([Express][1])
|
|
1089
|
+
* Supply chain:
|
|
1090
|
+
|
|
1091
|
+
* outdated Express versions; no lockfiles; no `npm audit` workflow ([Express][1])
|
|
1092
|
+
* Node runtime hazards:
|
|
1093
|
+
|
|
1094
|
+
* `--inspect` in production scripts; `insecureHTTPParser` usage ([Node.js][15])
|
|
1095
|
+
|
|
1096
|
+
Always try to confirm:
|
|
1097
|
+
|
|
1098
|
+
* data origin (untrusted vs trusted)
|
|
1099
|
+
* sink type (HTML/template, SQL/NoSQL, subprocess, filesystem, redirect, outbound HTTP)
|
|
1100
|
+
* protective controls present (validation, allowlists, middleware, proxy config, header policies)
|
|
1101
|
+
* whether protections are at the edge vs in app code
|
|
1102
|
+
|
|
1103
|
+
---
|
|
1104
|
+
|
|
1105
|
+
## 6) Sources (accessed 2026-01-27)
|
|
1106
|
+
|
|
1107
|
+
Primary Express documentation:
|
|
1108
|
+
|
|
1109
|
+
* Express: Production Best Practices — Security: `https://expressjs.com/en/advanced/best-practice-security.html` ([Express][1])
|
|
1110
|
+
* Express: Behind Proxies (`trust proxy`): `https://expressjs.com/en/guide/behind-proxies.html` ([Express][2])
|
|
1111
|
+
* Express 5.x API Reference (parsers, static, sendFile, redirect, cookies): `https://expressjs.com/en/5x/api.html` ([Express][5])
|
|
1112
|
+
* Express: Error Handling: `https://expressjs.com/en/guide/error-handling.html` ([Express][11])
|
|
1113
|
+
|
|
1114
|
+
Session middleware documentation:
|
|
1115
|
+
|
|
1116
|
+
* express-session docs (cookie flags, secret rotation, fixation mitigation, MemoryStore warning): `https://expressjs.com/en/resources/middleware/session.html` ([Express][1])
|
|
1117
|
+
|
|
1118
|
+
Node.js and npm official references:
|
|
1119
|
+
|
|
1120
|
+
* Node.js — Security Best Practices (DoS, proxy guidance, inspector risks, request smuggling notes): `https://nodejs.org/en/learn/getting-started/security-best-practices` ([Node.js][15])
|
|
1121
|
+
* npm Docs — `npm audit`: `https://docs.npmjs.com/cli/v9/commands/npm-audit/` ([npm Docs][16])
|
|
1122
|
+
|
|
1123
|
+
OWASP Cheat Sheet Series:
|
|
1124
|
+
|
|
1125
|
+
* Session Management: `https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html` ([OWASP Cheat Sheet Series][12])
|
|
1126
|
+
* CSRF Prevention: `https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html` ([OWASP Cheat Sheet Series][3])
|
|
1127
|
+
* XSS Prevention: `https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html` ([OWASP Cheat Sheet Series][4])
|
|
1128
|
+
* Input Validation: `https://cheatsheetseries.owasp.org/cheatsheets/Input_Validation_Cheat_Sheet.html` ([OWASP Cheat Sheet Series][17])
|
|
1129
|
+
* SQL Injection Prevention: `https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html` ([OWASP Cheat Sheet Series][6])
|
|
1130
|
+
* OS Command Injection Defense: `https://cheatsheetseries.owasp.org/cheatsheets/OS_Command_Injection_Defense_Cheat_Sheet.html` ([OWASP Cheat Sheet Series][14])
|
|
1131
|
+
* SSRF Prevention: `https://cheatsheetseries.owasp.org/cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.html` ([OWASP Cheat Sheet Series][7])
|
|
1132
|
+
* File Upload: `https://cheatsheetseries.owasp.org/cheatsheets/File_Upload_Cheat_Sheet.html` ([OWASP Cheat Sheet Series][13])
|
|
1133
|
+
* Unvalidated Redirects: `https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html` ([OWASP Cheat Sheet Series][18])
|
|
1134
|
+
* HTTP Headers: `https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html` ([OWASP Cheat Sheet Series][10])
|
|
1135
|
+
|
|
1136
|
+
Versioning / advisories:
|
|
1137
|
+
|
|
1138
|
+
* Express package version (npm): `https://www.npmjs.com/package/express`
|
|
1139
|
+
* Express open redirect advisory (CVE): `https://nvd.nist.gov/vuln/detail/CVE-2024-29041` ([NVD][9])
|
|
1140
|
+
|
|
1141
|
+
[1]: https://expressjs.com/en/advanced/best-practice-security.html "Security Best Practices for Express in Production"
|
|
1142
|
+
[2]: https://expressjs.com/en/guide/behind-proxies.html "Express behind proxies"
|
|
1143
|
+
[3]: https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html "Cross-Site Request Forgery Prevention - OWASP Cheat Sheet Series"
|
|
1144
|
+
[4]: https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html "Cross Site Scripting Prevention - OWASP Cheat Sheet Series"
|
|
1145
|
+
[5]: https://expressjs.com/en/5x/api.html "Express 5.x - API Reference"
|
|
1146
|
+
[6]: https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html "SQL Injection Prevention - OWASP Cheat Sheet Series"
|
|
1147
|
+
[7]: https://cheatsheetseries.owasp.org/cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.html "Server Side Request Forgery Prevention - OWASP Cheat Sheet Series"
|
|
1148
|
+
[8]: https://cheatsheetseries.owasp.org/cheatsheets/Nodejs_Security_Cheat_Sheet.html "Nodejs Security - OWASP Cheat Sheet Series"
|
|
1149
|
+
[9]: https://nvd.nist.gov/vuln/detail/cve-2024-29041?utm_source=chatgpt.com "CVE-2024-29041 Detail - NVD"
|
|
1150
|
+
[10]: https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html "HTTP Headers - OWASP Cheat Sheet Series"
|
|
1151
|
+
[11]: https://expressjs.com/en/guide/error-handling.html "Express error handling"
|
|
1152
|
+
[12]: https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html "Session Management - OWASP Cheat Sheet Series"
|
|
1153
|
+
[13]: https://cheatsheetseries.owasp.org/cheatsheets/File_Upload_Cheat_Sheet.html "File Upload - OWASP Cheat Sheet Series"
|
|
1154
|
+
[14]: https://cheatsheetseries.owasp.org/cheatsheets/OS_Command_Injection_Defense_Cheat_Sheet.html "OS Command Injection Defense - OWASP Cheat Sheet Series"
|
|
1155
|
+
[15]: https://nodejs.org/en/learn/getting-started/security-best-practices "Node.js — Security Best Practices"
|
|
1156
|
+
[16]: https://docs.npmjs.com/cli/v9/commands/npm-audit/ "npm-audit | npm Docs"
|
|
1157
|
+
[17]: https://cheatsheetseries.owasp.org/cheatsheets/Input_Validation_Cheat_Sheet.html "Input Validation - OWASP Cheat Sheet Series"
|
|
1158
|
+
[18]: https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html "Unvalidated Redirects and Forwards - OWASP Cheat Sheet Series"
|