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
|
@@ -0,0 +1,705 @@
|
|
|
1
|
+
# Flask (Python) Web Security Spec (Flask 3.1.x, Python 3.x)
|
|
2
|
+
|
|
3
|
+
This document is designed as a **security spec** that supports:
|
|
4
|
+
1) **Secure-by-default code generation** for new Flask code.
|
|
5
|
+
2) **Security review / vulnerability hunting** in existing Flask code (passive “notice issues while working” and active “scan the repo and report findings”).
|
|
6
|
+
|
|
7
|
+
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).
|
|
8
|
+
|
|
9
|
+
--------------------------------------------------------------------
|
|
10
|
+
|
|
11
|
+
## 0) Safety, boundaries, and anti-abuse constraints (MUST FOLLOW)
|
|
12
|
+
|
|
13
|
+
- MUST NOT request, output, log, or commit secrets (API keys, passwords, private keys, session cookies, SECRET_KEY).
|
|
14
|
+
- MUST NOT “fix” security by disabling protections (e.g., turning off CSRF, relaxing CORS, disabling escaping, disabling auth checks).
|
|
15
|
+
- MUST provide **evidence-based findings** during audits: cite file paths, code snippets, and configuration values that justify the claim.
|
|
16
|
+
- MUST treat uncertainty honestly: if a protection might exist in infrastructure (reverse proxy, WAF, CDN), report it as “not visible in app code; verify at runtime/config”.
|
|
17
|
+
|
|
18
|
+
--------------------------------------------------------------------
|
|
19
|
+
|
|
20
|
+
## 1) Operating modes
|
|
21
|
+
|
|
22
|
+
### 1.1 Generation mode (default)
|
|
23
|
+
When asked to write new Flask code or modify existing code:
|
|
24
|
+
- MUST follow every **MUST** requirement in this spec.
|
|
25
|
+
- SHOULD follow every **SHOULD** requirement unless the user explicitly says otherwise.
|
|
26
|
+
- MUST prefer safe-by-default APIs and proven libraries over custom security code.
|
|
27
|
+
- MUST avoid introducing new risky sinks (template rendering from strings, shell execution, dynamic imports, unsafe redirects, serving user files as HTML, etc.).
|
|
28
|
+
|
|
29
|
+
### 1.2 Passive review mode (always on while editing)
|
|
30
|
+
While working anywhere in a Flask repo (even if the user did not ask for a security scan):
|
|
31
|
+
- MUST “notice” violations of this spec in touched/nearby code.
|
|
32
|
+
- SHOULD mention issues as they come up, with a brief explanation + safe fix.
|
|
33
|
+
|
|
34
|
+
### 1.3 Active audit mode (explicit scan request)
|
|
35
|
+
When the user asks to “scan”, “audit”, or “hunt for vulns”:
|
|
36
|
+
- MUST systematically search the codebase for violations of this spec.
|
|
37
|
+
- MUST output findings in a structured format (see §2.3).
|
|
38
|
+
|
|
39
|
+
Recommended audit order:
|
|
40
|
+
1) App entrypoints / deployment scripts / Dockerfiles / Procfiles.
|
|
41
|
+
2) Flask configuration and environment handling.
|
|
42
|
+
3) Auth + sessions + cookies.
|
|
43
|
+
4) CSRF protections and state-changing routes.
|
|
44
|
+
5) Template rendering and XSS/SSTI.
|
|
45
|
+
6) File handling (uploads + downloads) and path traversal.
|
|
46
|
+
7) Injection classes (SQL, command execution, unsafe deserialization).
|
|
47
|
+
8) Outbound requests (SSRF).
|
|
48
|
+
9) Redirect handling (open redirects).
|
|
49
|
+
10) CORS and security headers.
|
|
50
|
+
|
|
51
|
+
--------------------------------------------------------------------
|
|
52
|
+
|
|
53
|
+
## 2) Definitions and review guidance
|
|
54
|
+
|
|
55
|
+
### 2.1 Untrusted input (treat as attacker-controlled unless proven otherwise)
|
|
56
|
+
Examples include:
|
|
57
|
+
- `request.args`, `request.form`, `request.values`
|
|
58
|
+
- `request.get_json()`, `request.json`, `request.data`
|
|
59
|
+
- `request.headers`, `request.cookies`
|
|
60
|
+
- URL path parameters (e.g., `/user/<id>`)
|
|
61
|
+
- Any data from external systems (webhooks, third-party APIs, message queues)
|
|
62
|
+
- Any persisted user content (DB rows) that originated from users
|
|
63
|
+
|
|
64
|
+
### 2.2 State-changing request
|
|
65
|
+
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.
|
|
66
|
+
|
|
67
|
+
### 2.3 Required audit finding format
|
|
68
|
+
For each issue found, output:
|
|
69
|
+
|
|
70
|
+
- Rule ID:
|
|
71
|
+
- Severity: Critical / High / Medium / Low
|
|
72
|
+
- Location: file path + function/route name + line(s)
|
|
73
|
+
- Evidence: the exact code/config snippet
|
|
74
|
+
- Impact: what could go wrong, who can exploit it
|
|
75
|
+
- Fix: safe change (prefer minimal diff)
|
|
76
|
+
- Mitigation: defense-in-depth if immediate fix is hard
|
|
77
|
+
- False positive notes: what to verify if uncertain
|
|
78
|
+
|
|
79
|
+
--------------------------------------------------------------------
|
|
80
|
+
|
|
81
|
+
## 3) Secure baseline: minimum production configuration (MUST in production)
|
|
82
|
+
|
|
83
|
+
This is the smallest “production baseline” that prevents common Flask misconfigurations.
|
|
84
|
+
|
|
85
|
+
### 3.1 App initialization pattern (SHOULD)
|
|
86
|
+
SHOULD use an app factory and environment-based config so production config is not hard-coded.
|
|
87
|
+
|
|
88
|
+
Example skeleton (illustrative; adjust to your project):
|
|
89
|
+
- Load config from environment / secret store.
|
|
90
|
+
- Fail closed if critical settings are missing in production.
|
|
91
|
+
|
|
92
|
+
Key baseline config targets:
|
|
93
|
+
- `SECRET_KEY` set and not committed
|
|
94
|
+
- `SESSION_COOKIE_SECURE=True` (when HTTPS) IMPORTANT NOTE: Only set `Secure` in production environment when 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.
|
|
95
|
+
- `SESSION_COOKIE_HTTPONLY=True`
|
|
96
|
+
- `SESSION_COOKIE_SAMESITE='Lax'` (or `'Strict'` if compatible)
|
|
97
|
+
- `TRUSTED_HOSTS` set in production
|
|
98
|
+
- Security headers set (CSP, etc.) either in app or at the edge
|
|
99
|
+
|
|
100
|
+
--------------------------------------------------------------------
|
|
101
|
+
|
|
102
|
+
## 4) Rules (generation + audit)
|
|
103
|
+
|
|
104
|
+
Each rule contains: required practice, insecure patterns, detection hints, and remediation.
|
|
105
|
+
|
|
106
|
+
### FLASK-DEPLOY-001: Do not use Flask’s development server in production
|
|
107
|
+
Severity: High (if production)
|
|
108
|
+
|
|
109
|
+
Required:
|
|
110
|
+
- MUST NOT deploy the built-in development server as the production server.
|
|
111
|
+
- MUST run behind a production-grade WSGI server or managed platform (such as gunicorn)
|
|
112
|
+
|
|
113
|
+
Insecure patterns:
|
|
114
|
+
- `app.run(...)` in a production entrypoint.
|
|
115
|
+
- Deployment docs/scripts that use `flask run` in production.
|
|
116
|
+
|
|
117
|
+
Detection hints:
|
|
118
|
+
- Search for `app.run(`, `flask run`, `--debug`, `FLASK_DEBUG`, `FLASK_ENV=development`.
|
|
119
|
+
- Check Docker CMD/ENTRYPOINT, Procfile, systemd units, shell scripts.
|
|
120
|
+
|
|
121
|
+
Fix:
|
|
122
|
+
- Use a production WSGI server (and keep Flask as the app object).
|
|
123
|
+
- Ensure the dev server is only used for local development.
|
|
124
|
+
|
|
125
|
+
Note:
|
|
126
|
+
- These are often used in dev mode or local testing. This is allowed. Only flag if it is clear that it is being used as the production entrypoint
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
### FLASK-DEPLOY-002: Debug mode MUST be disabled in production
|
|
131
|
+
Severity: Critical
|
|
132
|
+
|
|
133
|
+
Required:
|
|
134
|
+
- MUST NOT enable debug mode in production.
|
|
135
|
+
- MUST treat the interactive debugger as equivalent to remote code execution if exposed.
|
|
136
|
+
|
|
137
|
+
Insecure patterns:
|
|
138
|
+
- `app.run(debug=True)`
|
|
139
|
+
- `flask run --debug` in production.
|
|
140
|
+
- `DEBUG=True` via env/config in production.
|
|
141
|
+
|
|
142
|
+
Detection hints:
|
|
143
|
+
- Look for `debug=True`, `FLASK_DEBUG=1`, `DEBUG = True`, `app.debug = True`.
|
|
144
|
+
- Look for `TRAP_HTTP_EXCEPTIONS`/debugger settings enabled in non-test contexts.
|
|
145
|
+
|
|
146
|
+
Fix:
|
|
147
|
+
- Ensure debug is only enabled in local dev/test.
|
|
148
|
+
- Prefer environment-based toggles and safe defaults.
|
|
149
|
+
|
|
150
|
+
Note:
|
|
151
|
+
- These are often used in dev mode or local testing. This is allowed. Only flag if it is clear that it is being used as the production entrypoint
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
### FLASK-CONFIG-001: SECRET_KEY must be strong, secret, and rotated safely
|
|
156
|
+
Severity: High (Critical if missing in production with sessions or signing)
|
|
157
|
+
|
|
158
|
+
Required:
|
|
159
|
+
- MUST set a strong random `SECRET_KEY` in production.
|
|
160
|
+
- MUST keep `SECRET_KEY` out of source control and out of logs.
|
|
161
|
+
- MAY rotate keys periodically; MAY use `SECRET_KEY_FALLBACKS` to support rotation without instantly invalidating existing sessions, then remove old keys after the rotation window. This likely is not needed for smaller applications but is good practice for larger applications. As this may complicate deployment, suggest that it be implemented rather than implementing it by default.
|
|
162
|
+
|
|
163
|
+
Insecure patterns:
|
|
164
|
+
- Missing `SECRET_KEY` in production.
|
|
165
|
+
- Hard-coded `SECRET_KEY` in repo (including test keys accidentally used in prod).
|
|
166
|
+
- Logging or printing `SECRET_KEY`.
|
|
167
|
+
|
|
168
|
+
Detection hints:
|
|
169
|
+
- Search for `SECRET_KEY =`, `app.secret_key =`, `SECRET_KEY_FALLBACKS =`.
|
|
170
|
+
- Check `.env` files committed to repo.
|
|
171
|
+
- Check config modules for constants.
|
|
172
|
+
|
|
173
|
+
Fix:
|
|
174
|
+
- Load from secret manager or environment variable.
|
|
175
|
+
- Add a rotation process:
|
|
176
|
+
- Set new `SECRET_KEY`
|
|
177
|
+
- Keep old key(s) temporarily in `SECRET_KEY_FALLBACKS`
|
|
178
|
+
- Remove old key(s) after the safe window.
|
|
179
|
+
|
|
180
|
+
Notes:
|
|
181
|
+
- If the application uses Flask sessions (cookie-based by default), `SECRET_KEY` is directly security-critical.
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
### FLASK-SESS-001: Session cookies must use secure attributes in production
|
|
186
|
+
Severity: Medium
|
|
187
|
+
|
|
188
|
+
Required (production, HTTPS):
|
|
189
|
+
- MUST set `SESSION_COOKIE_SECURE=True` (cookies only over HTTPS). NOTE: Only set `Secure` in production environment when 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.
|
|
190
|
+
- MUST ensure `SESSION_COOKIE_HTTPONLY=True` (protect from JS access).
|
|
191
|
+
- SHOULD set `SESSION_COOKIE_SAMESITE='Lax'` (recommended) or `'Strict'` if compatible with UX.
|
|
192
|
+
- SHOULD keep `SESSION_COOKIE_DOMAIN=None` unless you explicitly need subdomain-wide cookies.
|
|
193
|
+
- If you need embedded/iframe third-party usage, MAY consider `SESSION_COOKIE_PARTITIONED=True` (requires HTTPS).
|
|
194
|
+
|
|
195
|
+
Insecure patterns:
|
|
196
|
+
- `SESSION_COOKIE_SECURE=False` in production.
|
|
197
|
+
- `SESSION_COOKIE_HTTPONLY=False`.
|
|
198
|
+
- `SESSION_COOKIE_SAMESITE=None` with cookie-authenticated state-changing endpoints (higher CSRF risk).
|
|
199
|
+
|
|
200
|
+
Detection hints:
|
|
201
|
+
- Inspect `app.config.update(...)` blocks and config classes.
|
|
202
|
+
- Look for `set_cookie(..., secure=..., httponly=..., samesite=...)` usage on non-session cookies too.
|
|
203
|
+
|
|
204
|
+
Fix:
|
|
205
|
+
- Set these config values explicitly in production config.
|
|
206
|
+
|
|
207
|
+
Notes:
|
|
208
|
+
- SameSite is defense-in-depth; do not treat it as a full replacement for CSRF tokens.
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
### FLASK-SESS-002: Sessions must be bounded and resistant to fixation/replay
|
|
213
|
+
Severity: Medium
|
|
214
|
+
|
|
215
|
+
Required:
|
|
216
|
+
- SHOULD set a bounded session lifetime appropriate to the app.
|
|
217
|
+
- SHOULD set `session.permanent = True` only when you intend persistent sessions, and set `PERMANENT_SESSION_LIFETIME` to a justified value.
|
|
218
|
+
- SHOULD clear the session on login and privilege changes to reduce session fixation risk.
|
|
219
|
+
- MUST NOT store sensitive secrets in the default Flask session cookie. The default session is signed, not encrypted.
|
|
220
|
+
|
|
221
|
+
Insecure patterns:
|
|
222
|
+
- Extremely long or unlimited lifetimes for privileged sessions.
|
|
223
|
+
- No session clearing on login.
|
|
224
|
+
- Storing secrets (passwords, access tokens, PII) directly in `session[...]` when using default cookie sessions.
|
|
225
|
+
|
|
226
|
+
Detection hints:
|
|
227
|
+
- Search for `PERMANENT_SESSION_LIFETIME`, `session.permanent`, `session[...] =`.
|
|
228
|
+
- Identify whether server-side session storage is used; if not, assume default cookie sessions.
|
|
229
|
+
|
|
230
|
+
Fix:
|
|
231
|
+
- Set appropriate lifetimes.
|
|
232
|
+
- Clear/rotate session on login.
|
|
233
|
+
- Store sensitive data server-side; store only identifiers in the session cookie.
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
### FLASK-CSRF-001: State-changing requests using cookie auth MUST be CSRF-protected
|
|
238
|
+
Severity: High
|
|
239
|
+
|
|
240
|
+
- 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.
|
|
241
|
+
|
|
242
|
+
Required:
|
|
243
|
+
- MUST protect all state-changing endpoints (POST/PUT/PATCH/DELETE) that rely on cookies for authentication.
|
|
244
|
+
- MAY use a well-tested CSRF library/integration (form framework or middleware) rather than rolling your own.
|
|
245
|
+
- MAY use additional defenses (Origin/Referer checking, SameSite cookies, Fetch Metadata headers, custom headers for AJAX/API), but tokens remain the primary defense for cookie-authenticated apps.
|
|
246
|
+
If tokens are impractical, or for small applications:
|
|
247
|
+
* MUST at a minimum require a custom header to be set and set the session cookie SESSION_COOKIE_SAMESITE=lax, as this is the strongest method besides requiring a form token, and may be much easier to implement.
|
|
248
|
+
|
|
249
|
+
Insecure patterns:
|
|
250
|
+
- Cookie-authenticated endpoints that change state with no CSRF protection.
|
|
251
|
+
- Using GET for state-changing actions (amplifies CSRF risk).
|
|
252
|
+
|
|
253
|
+
Detection hints:
|
|
254
|
+
- Enumerate routes with methods other than GET and identify auth mechanism.
|
|
255
|
+
- Look for CSRF integrations (e.g., Flask-WTF, global CSRF middleware). If absent, treat as suspicious.
|
|
256
|
+
- Check JSON API endpoints too, not only HTML forms.
|
|
257
|
+
|
|
258
|
+
Fix:
|
|
259
|
+
- Add CSRF protection to all state-changing requests.
|
|
260
|
+
- If the app is a pure API and uses Authorization headers (bearer tokens) rather than cookies, document that choice and ensure cookies aren’t used for auth. If cookies are not used for auth, there is no CSRF risk.
|
|
261
|
+
|
|
262
|
+
Notes:
|
|
263
|
+
- XSS can defeat CSRF protections; CSRF defenses do not replace XSS prevention.
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
### FLASK-XSS-001: Prevent reflected/stored XSS in templates and HTML generation
|
|
268
|
+
Severity: High
|
|
269
|
+
|
|
270
|
+
Required:
|
|
271
|
+
- MUST rely on Jinja auto-escaping for HTML templates.
|
|
272
|
+
- MUST NOT mark untrusted content as safe:
|
|
273
|
+
- Avoid `Markup(...)` on user data.
|
|
274
|
+
- Avoid Jinja `|safe` on user-controlled content.
|
|
275
|
+
- MUST quote HTML attributes containing Jinja expressions (`value="{{ x }}"` not `value={{ x }}`).
|
|
276
|
+
- MUST NOT serve uploaded HTML as active HTML; serve as download (`Content-Disposition: attachment`) or transform to a safe format. Note: This is only relevant if it is possible to upload document content such as html, js, css, etc. If it purely is image files, there is no concern.
|
|
277
|
+
- SHOULD deploy a Content Security Policy (CSP) to mitigate XSS classes (including `javascript:` in `href`).
|
|
278
|
+
|
|
279
|
+
Insecure patterns:
|
|
280
|
+
- `Markup(request.args.get(...))`
|
|
281
|
+
- Template filters: `{{ user_html|safe }}`
|
|
282
|
+
- Unquoted attributes in templates
|
|
283
|
+
- Serving user-uploaded content directly with `text/html` or inline rendering
|
|
284
|
+
|
|
285
|
+
Detection hints:
|
|
286
|
+
- Search for `Markup(` and investigate origin of the data.
|
|
287
|
+
- Search template files for `|safe`, `|tojson` misuse, and unquoted attributes.
|
|
288
|
+
- Review file-serving routes that might return user uploads without `as_attachment=True`. Note: This is only relevant if it is possible to upload document content such as html, js, css, etc. If it purely is image files, there is no concern.
|
|
289
|
+
|
|
290
|
+
Fix:
|
|
291
|
+
- Remove unsafe marking; sanitize only when strictly necessary using a trusted HTML sanitizer.
|
|
292
|
+
- Always quote attributes.
|
|
293
|
+
- Add CSP and reduce inline scripts.
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
### FLASK-SSTI-001: Never render untrusted templates (Server-Side Template Injection)
|
|
298
|
+
Severity: Critical
|
|
299
|
+
|
|
300
|
+
Required:
|
|
301
|
+
- MUST NOT render templates that contain user-controlled template syntax.
|
|
302
|
+
- MUST treat `render_template_string` and `Environment.from_string(...).render(...)` as dangerous if the template string is influenced by untrusted input.
|
|
303
|
+
- MUST NOT use use `.format()` on user controlled strings
|
|
304
|
+
- If untrusted templates are absolutely required, treat it as a special high-risk design:
|
|
305
|
+
- MUST use a sandboxed templating approach and restrict capabilities.
|
|
306
|
+
- MUST keep Jinja updated and assume sandbox escapes are possible; isolate further.
|
|
307
|
+
|
|
308
|
+
Insecure patterns:
|
|
309
|
+
- `render_template_string(request.args["tmpl"], ...)`
|
|
310
|
+
- Storing user templates in DB and rendering them with the normal Jinja environment.
|
|
311
|
+
- `request.args["tmpl"].format(...)`
|
|
312
|
+
|
|
313
|
+
Detection hints:
|
|
314
|
+
- Grep for `render_template_string`, `from_string`, `.render(` with dynamic strings.
|
|
315
|
+
- Trace the origin of the template string (DB, request, uploads, admin panels).
|
|
316
|
+
|
|
317
|
+
Fix:
|
|
318
|
+
- Replace with safe templating alternatives that do not evaluate code (e.g., string.Template, str.replace).
|
|
319
|
+
- If templates must be user-defined, use a sandbox plus strict allowlists and heavy isolation.
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
### FLASK-HEADERS-001: Set essential security headers (in app or at the edge)
|
|
324
|
+
Severity: Medium
|
|
325
|
+
|
|
326
|
+
Required (typical web app):
|
|
327
|
+
- SHOULD set:
|
|
328
|
+
- CSP (`Content-Security-Policy`)
|
|
329
|
+
- `X-Content-Type-Options: nosniff`
|
|
330
|
+
- Clickjacking protection (`X-Frame-Options: SAMEORIGIN` and/or CSP `frame-ancestors`) (there may be cases where the user wants to iframe their site elsewhere. If that is the case, work with them to safely allow it)
|
|
331
|
+
- SHOULD consider additional hardening headers depending on app (Referrer-Policy, Permissions-Policy).
|
|
332
|
+
- MUST ensure cookies are set with secure attributes (see FLASK-SESS-001).
|
|
333
|
+
|
|
334
|
+
NOTE: Security headers may be set via a proxy or other cloud provider. Check to see if there is evidence of that.
|
|
335
|
+
|
|
336
|
+
Insecure patterns:
|
|
337
|
+
- No security headers anywhere (app or edge).
|
|
338
|
+
- CSP missing on apps that display untrusted content.
|
|
339
|
+
|
|
340
|
+
Detection hints:
|
|
341
|
+
- Search for `after_request` hooks, Flask-Talisman usage, reverse proxy config.
|
|
342
|
+
- If not visible in app code, flag as “verify at edge”.
|
|
343
|
+
|
|
344
|
+
Fix:
|
|
345
|
+
- Set headers centrally (middleware / after_request) or via reverse proxy/CDN.
|
|
346
|
+
- Keep CSP realistic and compatible; avoid `unsafe-inline` where possible.
|
|
347
|
+
|
|
348
|
+
---
|
|
349
|
+
|
|
350
|
+
### FLASK-LIMITS-001: Request size and form parsing limits MUST be set appropriately
|
|
351
|
+
Severity: Low (Medium if file uploads / large bodies are possible)
|
|
352
|
+
|
|
353
|
+
Required:
|
|
354
|
+
- SHOULD set and justify:
|
|
355
|
+
- `MAX_CONTENT_LENGTH` (global maximum request bytes)
|
|
356
|
+
- `MAX_FORM_MEMORY_SIZE` (max per non-file form field in multipart)
|
|
357
|
+
- `MAX_FORM_PARTS` (max number of multipart fields)
|
|
358
|
+
- MUST enforce additional limits at the reverse proxy / WSGI / platform level where possible.
|
|
359
|
+
|
|
360
|
+
Insecure patterns:
|
|
361
|
+
- Unlimited request body sizes when handling uploads or user content.
|
|
362
|
+
- Accepting arbitrarily large multipart forms or many fields.
|
|
363
|
+
|
|
364
|
+
Detection hints:
|
|
365
|
+
- Inspect Flask config for these keys.
|
|
366
|
+
- Inspect upload routes and APIs that accept large JSON.
|
|
367
|
+
|
|
368
|
+
Fix:
|
|
369
|
+
- Set conservative defaults, override per-route only when needed.
|
|
370
|
+
- Ensure large uploads use dedicated upload mechanisms.
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
374
|
+
### FLASK-HOST-001: Host header must be validated in production
|
|
375
|
+
Severity: Low (depends on app’s use of external URLs)
|
|
376
|
+
|
|
377
|
+
Required:
|
|
378
|
+
- MUST set `TRUSTED_HOSTS` in production to restrict accepted Host values.
|
|
379
|
+
- MUST NOT rely on `SERVER_NAME` as a host restriction mechanism.
|
|
380
|
+
|
|
381
|
+
Insecure patterns:
|
|
382
|
+
- `TRUSTED_HOSTS` unset in production.
|
|
383
|
+
- Code that generates external URLs for emails/password resets without host validation.
|
|
384
|
+
|
|
385
|
+
Detection hints:
|
|
386
|
+
- Find `TRUSTED_HOSTS` config usage.
|
|
387
|
+
- Find `url_for(..., _external=True)` and check how host is determined.
|
|
388
|
+
|
|
389
|
+
Fix:
|
|
390
|
+
- Set `TRUSTED_HOSTS` to your expected domains (and required subdomains).
|
|
391
|
+
- Ensure external URL generation uses trusted host/scheme.
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
### FLASK-PROXY-001: Reverse proxy trust must be configured correctly
|
|
396
|
+
Severity: Medium (High if relying on IPs for auth)
|
|
397
|
+
|
|
398
|
+
Required:
|
|
399
|
+
- If behind a reverse proxy, MUST configure Flask/Werkzeug to trust forwarded headers only from the intended proxy.
|
|
400
|
+
- MUST NOT blindly trust `X-Forwarded-*` headers from the open internet.
|
|
401
|
+
|
|
402
|
+
Insecure patterns:
|
|
403
|
+
- `ProxyFix` applied with overly broad trust settings, or applied without understanding how many proxies are in front.
|
|
404
|
+
- Relying on forwarded headers for scheme/host without validation.
|
|
405
|
+
|
|
406
|
+
Detection hints:
|
|
407
|
+
- Search for `ProxyFix`.
|
|
408
|
+
- Search for usage of `request.remote_addr`, `request.scheme`, `request.host` in security-sensitive logic.
|
|
409
|
+
|
|
410
|
+
Fix:
|
|
411
|
+
- Configure `ProxyFix` (or platform-specific settings) with correct hop counts.
|
|
412
|
+
- Keep `TRUSTED_HOSTS` in place even behind proxies.
|
|
413
|
+
|
|
414
|
+
---
|
|
415
|
+
|
|
416
|
+
### FLASK-PATH-001: Prevent path traversal and unsafe file serving
|
|
417
|
+
Severity: High
|
|
418
|
+
|
|
419
|
+
Required:
|
|
420
|
+
- MUST NOT pass user-controlled file paths to `send_file` or to direct file I/O.
|
|
421
|
+
- MUST use safe file serving patterns:
|
|
422
|
+
- `send_from_directory` for user-specified paths under a trusted base directory
|
|
423
|
+
- `safe_join` for joining a trusted base directory with untrusted path components
|
|
424
|
+
- `secure_filename` for uploaded filenames (and still generate your own unique storage name)
|
|
425
|
+
- MUST ensure user uploads are not served as executable/active content (especially HTML).
|
|
426
|
+
- SHOULD in general use `safe_join` over `os.path.join` for almost any filesystem path computations.
|
|
427
|
+
|
|
428
|
+
Insecure patterns:
|
|
429
|
+
- `send_file(request.args["path"])`
|
|
430
|
+
- `open(os.path.join(base_dir, user_path))` where `user_path` is untrusted
|
|
431
|
+
- Serving uploads from within a static web root without restrictions
|
|
432
|
+
|
|
433
|
+
Detection hints:
|
|
434
|
+
- Search for `send_file(`, `open(`, `os.path.join(`, `pathlib.Path(...)/...` in file routes.
|
|
435
|
+
- Identify where filenames come from (request args, DB, headers).
|
|
436
|
+
|
|
437
|
+
Fix:
|
|
438
|
+
- Serve only from a non-user-controlled directory base.
|
|
439
|
+
- Store uploads outside static roots; serve through controlled routes.
|
|
440
|
+
- Always validate and normalize file identifiers.
|
|
441
|
+
|
|
442
|
+
Note: `safe_join` is imported from `werkzeug.security`
|
|
443
|
+
|
|
444
|
+
---
|
|
445
|
+
|
|
446
|
+
### FLASK-UPLOAD-001: File uploads must be validated, stored safely, and served safely
|
|
447
|
+
Severity: High
|
|
448
|
+
|
|
449
|
+
Required:
|
|
450
|
+
- MUST enforce upload size limits (app + edge).
|
|
451
|
+
- MUST validate file type using allowlists and content checks (not only extension).
|
|
452
|
+
- MUST store uploads outside executable/static roots when possible.
|
|
453
|
+
- SHOULD generate server-side filenames (random IDs) and avoid trusting original names.
|
|
454
|
+
- MUST serve potentially active formats safely (download attachment) unless explicitly intended.
|
|
455
|
+
|
|
456
|
+
Insecure patterns:
|
|
457
|
+
- Accepting arbitrary file types and serving them back inline.
|
|
458
|
+
- Using user-supplied filename as storage path.
|
|
459
|
+
- Missing size/type validation.
|
|
460
|
+
|
|
461
|
+
Detection hints:
|
|
462
|
+
- Look for `request.files[...]` handlers.
|
|
463
|
+
- Check for `secure_filename` usage (and whether it’s combined with uniqueness).
|
|
464
|
+
- Check where files are stored and how they are served.
|
|
465
|
+
|
|
466
|
+
Fix:
|
|
467
|
+
- Implement allowlist validation + safe storage + safe serving.
|
|
468
|
+
- Add scanning / quarantine if applicable.
|
|
469
|
+
|
|
470
|
+
---
|
|
471
|
+
|
|
472
|
+
### FLASK-INJECT-001: Prevent SQL injection (use parameterized queries / ORM)
|
|
473
|
+
Severity: High
|
|
474
|
+
|
|
475
|
+
Required:
|
|
476
|
+
- MUST use parameterized queries or an ORM that parameterizes under the hood.
|
|
477
|
+
- MUST NOT build SQL by string concatenation / f-strings with untrusted input.
|
|
478
|
+
|
|
479
|
+
Insecure patterns:
|
|
480
|
+
- `f"SELECT ... WHERE id={request.args['id']}"`
|
|
481
|
+
- `"... WHERE name = '%s'" % user_input`
|
|
482
|
+
|
|
483
|
+
Detection hints:
|
|
484
|
+
- Grep for `SELECT`, `INSERT`, `UPDATE`, `DELETE` strings in Python code.
|
|
485
|
+
- Track untrusted data into DB execute calls.
|
|
486
|
+
|
|
487
|
+
Fix:
|
|
488
|
+
- Replace with parameterized queries or ORM query APIs.
|
|
489
|
+
- Validate types (e.g., int IDs) before querying.
|
|
490
|
+
|
|
491
|
+
---
|
|
492
|
+
|
|
493
|
+
### FLASK-INJECT-002: Prevent OS command injection
|
|
494
|
+
Severity: Critical to High (depends on exposure)
|
|
495
|
+
|
|
496
|
+
Required:
|
|
497
|
+
- MUST avoid executing shell commands with untrusted input.
|
|
498
|
+
- If subprocess is necessary:
|
|
499
|
+
- MUST pass args as a list (not a string)
|
|
500
|
+
- MUST NOT use `shell=True` with attacker-influenced strings
|
|
501
|
+
- SHOULD use strict allowlists for any variable component
|
|
502
|
+
- If possible, use pure python or a python library rather than using a subprocess or system command
|
|
503
|
+
- Do not assume that arguments to commands will be inherently safe even in `shell=False`. Commands may incorrectly process these arguments as command line flags or other trusted values.
|
|
504
|
+
|
|
505
|
+
Insecure patterns:
|
|
506
|
+
- `os.system(user_input)`
|
|
507
|
+
- `subprocess.run(f"cmd {user}", shell=True)`
|
|
508
|
+
- Passing user strings into `bash -c`, `sh -c`, PowerShell, etc.
|
|
509
|
+
|
|
510
|
+
Detection hints:
|
|
511
|
+
- Search for `os.system`, `subprocess`, `Popen`, `shell=True`.
|
|
512
|
+
- Trace data from request/DB into these calls.
|
|
513
|
+
|
|
514
|
+
Fix:
|
|
515
|
+
- Use library APIs instead of shell commands.
|
|
516
|
+
- If unavoidable, hard-code the command and allowlist validated parameters. If supported by the subcommand, try to keep user values after `--` to prevent them being processed as command line flags.
|
|
517
|
+
|
|
518
|
+
---
|
|
519
|
+
|
|
520
|
+
### FLASK-SSRF-001: Prevent server-side request forgery (SSRF) in outbound HTTP
|
|
521
|
+
Severity: Medium
|
|
522
|
+
|
|
523
|
+
- Note: For small stand alone projects this is less important. It is most important when deploying into an LAN or with other services listening on the same server.
|
|
524
|
+
|
|
525
|
+
Required:
|
|
526
|
+
- MUST treat outbound requests to user-provided URLs as high risk.
|
|
527
|
+
- SHOULD validate and restrict destinations (allowlist hosts/domains) for any user-influenced URL fetch.
|
|
528
|
+
- SHOULD block access to:
|
|
529
|
+
- localhost / private IP ranges / link-local addresses
|
|
530
|
+
- cloud metadata endpoints
|
|
531
|
+
- MUST NOT allow non http/https protocols (ie file: etc)
|
|
532
|
+
- SHOULD set timeouts and restrict redirects.
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
Insecure patterns:
|
|
537
|
+
- `requests.get(request.args["url"])`
|
|
538
|
+
- Webhooks/preview/fetch endpoints that accept arbitrary URLs.
|
|
539
|
+
|
|
540
|
+
Detection hints:
|
|
541
|
+
- Search for `requests.get/post`, `httpx`, `urllib`, `aiohttp` usage with untrusted URL sources.
|
|
542
|
+
- Identify URL fetch features (preview, import, webhook tester).
|
|
543
|
+
|
|
544
|
+
Fix:
|
|
545
|
+
- Ensure URLs are http or https (disallow file: or other protocols)
|
|
546
|
+
- Enforce allowlists and network egress controls.
|
|
547
|
+
- Add strict parsing and IP resolution checks; set timeouts; disable redirects if not needed.
|
|
548
|
+
|
|
549
|
+
---
|
|
550
|
+
|
|
551
|
+
### FLASK-REDIRECT-001: Prevent open redirects
|
|
552
|
+
Severity: Low
|
|
553
|
+
|
|
554
|
+
Required:
|
|
555
|
+
- MUST validate redirect targets derived from untrusted input (e.g., `next`, `redirect`, `return_to`).
|
|
556
|
+
- SHOULD use allowlists of internal paths or known domains.
|
|
557
|
+
- SHOULD prefer redirecting only to same-site relative paths.
|
|
558
|
+
|
|
559
|
+
Insecure patterns:
|
|
560
|
+
- `redirect(request.args.get("next"))` with no validation.
|
|
561
|
+
|
|
562
|
+
Detection hints:
|
|
563
|
+
- Search for `redirect(` and examine where `location` comes from.
|
|
564
|
+
|
|
565
|
+
Fix:
|
|
566
|
+
- Only allow relative paths or allowlisted domains.
|
|
567
|
+
- Fall back to a safe default if validation fails.
|
|
568
|
+
|
|
569
|
+
---
|
|
570
|
+
|
|
571
|
+
### FLASK-HTTP-001: Use HTTP methods safely; do not change state via GET; avoid secrets in URLs
|
|
572
|
+
Severity: Medium
|
|
573
|
+
|
|
574
|
+
Required:
|
|
575
|
+
- MUST NOT perform state-changing actions over GET.
|
|
576
|
+
- MUST NOT put secrets in URLs (query strings are commonly logged and leaked via referrers).
|
|
577
|
+
- SHOULD require POST/PUT/PATCH/DELETE for state change and apply CSRF protections when cookie-authenticated.
|
|
578
|
+
|
|
579
|
+
Insecure patterns:
|
|
580
|
+
- `/delete?id=...` implemented as GET
|
|
581
|
+
- Password reset tokens or API keys in query params
|
|
582
|
+
|
|
583
|
+
Detection hints:
|
|
584
|
+
- Enumerate GET routes and inspect whether they mutate state.
|
|
585
|
+
- Look for URL parameters named `token`, `key`, `secret`, `password`, etc.
|
|
586
|
+
|
|
587
|
+
Fix:
|
|
588
|
+
- Move state changes to non-GET methods.
|
|
589
|
+
- Move sensitive values to secure channels (POST bodies, headers) and protect them.
|
|
590
|
+
|
|
591
|
+
---
|
|
592
|
+
|
|
593
|
+
### FLASK-CORS-001: CORS must be explicit and least-privilege
|
|
594
|
+
Severity: Medium (High if misconfigured with credentials)
|
|
595
|
+
|
|
596
|
+
Required:
|
|
597
|
+
- If CORS is not needed, MUST keep it disabled.
|
|
598
|
+
- If CORS is needed:
|
|
599
|
+
- MUST allowlist trusted origins (do not reflect arbitrary origins).
|
|
600
|
+
- MUST be careful with credentialed requests; do not combine broad origins with cookies.
|
|
601
|
+
- SHOULD restrict allowed methods and headers.
|
|
602
|
+
|
|
603
|
+
Insecure patterns:
|
|
604
|
+
- `Access-Control-Allow-Origin: *` paired with credentialed cookies or overly broad access.
|
|
605
|
+
- Reflecting `Origin` without validation.
|
|
606
|
+
- `flask_cors.CORS(app)` with permissive defaults.
|
|
607
|
+
|
|
608
|
+
Detection hints:
|
|
609
|
+
- Search for `flask_cors`, `CORS(`, `Access-Control-Allow-Origin`.
|
|
610
|
+
- Check for `supports_credentials=True` and wildcard origins.
|
|
611
|
+
|
|
612
|
+
Fix:
|
|
613
|
+
- Use a strict origin allowlist and minimal methods/headers.
|
|
614
|
+
- Ensure cookie-authenticated endpoints are not exposed cross-origin unless necessary.
|
|
615
|
+
|
|
616
|
+
---
|
|
617
|
+
|
|
618
|
+
### FLASK-SUPPLY-001: Dependency and patch hygiene (focus on security-relevant deps)
|
|
619
|
+
Severity: Low
|
|
620
|
+
|
|
621
|
+
Required:
|
|
622
|
+
- SHOULD pin and regularly update security-critical dependencies (Flask, Werkzeug, Jinja2, itsdangerous).
|
|
623
|
+
- MUST respond to known security advisories promptly.
|
|
624
|
+
|
|
625
|
+
Audit focus example:
|
|
626
|
+
- If running on Windows and using file serving with untrusted paths, ensure Werkzeug’s `safe_join` behavior is not vulnerable to Windows device-name edge cases.
|
|
627
|
+
|
|
628
|
+
Detection hints:
|
|
629
|
+
- Check `requirements.txt`, lockfiles, and runtime environments.
|
|
630
|
+
- Identify where security helpers are used (safe_join, send_from_directory).
|
|
631
|
+
|
|
632
|
+
Fix:
|
|
633
|
+
- Upgrade to patched versions and add regression tests for the impacted behavior.
|
|
634
|
+
|
|
635
|
+
--------------------------------------------------------------------
|
|
636
|
+
|
|
637
|
+
## 5) Practical scanning heuristics (how to “hunt”)
|
|
638
|
+
|
|
639
|
+
When actively scanning, use these high-signal patterns:
|
|
640
|
+
|
|
641
|
+
- Dev server / debug:
|
|
642
|
+
- `app.run(`, `flask run`, `--debug`, `DEBUG=True`, `FLASK_DEBUG`
|
|
643
|
+
- Secrets:
|
|
644
|
+
- `SECRET_KEY`, `secret_key`, `.env` committed, `print(config)`
|
|
645
|
+
- Cookies / sessions:
|
|
646
|
+
- `SESSION_COOKIE_SECURE`, `SESSION_COOKIE_HTTPONLY`, `SESSION_COOKIE_SAMESITE`
|
|
647
|
+
- `session[...] =` with sensitive values
|
|
648
|
+
- CSRF:
|
|
649
|
+
- POST/PUT/PATCH/DELETE handlers without CSRF checks in cookie-authenticated apps
|
|
650
|
+
- XSS/SSTI:
|
|
651
|
+
- `Markup(`, `|safe`, unquoted attributes, `render_template_string`
|
|
652
|
+
- Files:
|
|
653
|
+
- `send_file(` with user-controlled path; `open(` on user path; `os.path.join` with untrusted
|
|
654
|
+
- upload handlers using user filename for path
|
|
655
|
+
- Injection:
|
|
656
|
+
- SQL strings + string formatting into `.execute(...)`
|
|
657
|
+
- `subprocess.*`, `shell=True`, `os.system`
|
|
658
|
+
- SSRF:
|
|
659
|
+
- `requests.get/post` or `httpx` with URL from request/DB
|
|
660
|
+
- Redirect:
|
|
661
|
+
- `redirect(request.args.get("next"))`
|
|
662
|
+
- CORS:
|
|
663
|
+
- `flask_cors.CORS` permissive configs; wildcard origins with credentials
|
|
664
|
+
|
|
665
|
+
Always try to confirm:
|
|
666
|
+
- data origin (untrusted vs trusted)
|
|
667
|
+
- sink type (template/SQL/subprocess/files/redirect/http)
|
|
668
|
+
- protective controls present (validation, allowlists, middleware)
|
|
669
|
+
|
|
670
|
+
--------------------------------------------------------------------
|
|
671
|
+
|
|
672
|
+
## 6) Sources (accessed 2026-01-26)
|
|
673
|
+
|
|
674
|
+
Primary framework documentation:
|
|
675
|
+
- Flask Docs: Deploying to Production — https://flask.palletsprojects.com/en/stable/deploying/
|
|
676
|
+
- Flask Docs: Debugging Application Errors — https://flask.palletsprojects.com/en/stable/debugging/
|
|
677
|
+
- Flask Docs: Configuration Handling — https://flask.palletsprojects.com/en/stable/config/
|
|
678
|
+
- Flask Docs: Security Considerations — https://flask.palletsprojects.com/en/stable/web-security/
|
|
679
|
+
- Flask Docs: Tell Flask it is Behind a Proxy — https://flask.palletsprojects.com/en/stable/deploying/proxy_fix/
|
|
680
|
+
- Flask API Docs: Sessions — https://flask.palletsprojects.com/en/stable/api/#sessions
|
|
681
|
+
|
|
682
|
+
Werkzeug documentation & advisories:
|
|
683
|
+
- Werkzeug Docs: Utilities (send_file / send_from_directory / safe_join / secure_filename / password hashing) — https://werkzeug.palletsprojects.com/en/stable/utils/
|
|
684
|
+
- GitHub Advisory: CVE-2025-66221 (Werkzeug safe_join Windows device names) — https://github.com/advisories/GHSA-hgf8-39gv-g3f2
|
|
685
|
+
|
|
686
|
+
OWASP Cheat Sheet Series:
|
|
687
|
+
- Session Management — https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html
|
|
688
|
+
- CSRF Prevention — https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html
|
|
689
|
+
- XSS Prevention — https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html
|
|
690
|
+
- Input Validation — https://cheatsheetseries.owasp.org/cheatsheets/Input_Validation_Cheat_Sheet.html
|
|
691
|
+
- SQL Injection Prevention — https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html
|
|
692
|
+
- Injection Prevention — https://cheatsheetseries.owasp.org/cheatsheets/Injection_Prevention_Cheat_Sheet.html
|
|
693
|
+
- OS Command Injection Defense — https://cheatsheetseries.owasp.org/cheatsheets/OS_Command_Injection_Defense_Cheat_Sheet.html
|
|
694
|
+
- SSRF Prevention — https://cheatsheetseries.owasp.org/cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.html
|
|
695
|
+
- File Upload — https://cheatsheetseries.owasp.org/cheatsheets/File_Upload_Cheat_Sheet.html
|
|
696
|
+
- Unvalidated Redirects — https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html
|
|
697
|
+
- HTTP Headers — https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html
|
|
698
|
+
|
|
699
|
+
Template safety references:
|
|
700
|
+
- Jinja: Sandbox (rendering untrusted templates) — https://jinja.palletsprojects.com/en/stable/sandbox/
|
|
701
|
+
- OWASP WSTG: Testing for Server-Side Template Injection — https://owasp.org/www-project-web-security-testing-guide/v41/4-Web_Application_Security_Testing/07-Input_Validation_Testing/18-Testing_for_Server_Side_Template_Injection
|
|
702
|
+
- PortSwigger Web Security Academy: Server-side template injection — https://portswigger.net/web-security/server-side-template-injection
|
|
703
|
+
|
|
704
|
+
HTTP semantics:
|
|
705
|
+
- RFC 9110: HTTP Semantics (safe methods) — https://www.rfc-editor.org/rfc/rfc9110
|