@gspothq/cli 0.0.0-stage → 0.1.1

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.
Files changed (232) hide show
  1. package/README.md +18 -2
  2. package/configurations/database/postgres/manifest.toml +114 -0
  3. package/configurations/database/postgres/rules/POSTGRES.md +78 -0
  4. package/configurations/framework/astro/eslint-presets.json +138 -0
  5. package/configurations/framework/astro/manifest.toml +95 -0
  6. package/configurations/framework/astro/rules/ASTRO.md +39 -0
  7. package/configurations/framework/expo/manifest.toml +43 -0
  8. package/configurations/framework/express/manifest.toml +17 -0
  9. package/configurations/framework/express/rules/EXPRESS.md +73 -0
  10. package/configurations/framework/express/semgrep/express.yml +71 -0
  11. package/configurations/framework/fastapi/manifest.toml +11 -0
  12. package/configurations/framework/fastapi/rules/FASTAPI.md +100 -0
  13. package/configurations/framework/fastapi/semgrep/fastapi.yml +44 -0
  14. package/configurations/framework/nestjs/eslint-presets.json +62 -0
  15. package/configurations/framework/nestjs/manifest.toml +52 -0
  16. package/configurations/framework/nestjs/rules/NESTJS.md +44 -0
  17. package/configurations/framework/nextjs/eslint-presets.json +73 -0
  18. package/configurations/framework/nextjs/manifest.toml +119 -0
  19. package/configurations/framework/nextjs/rules/NEXTJS.md +43 -0
  20. package/configurations/framework/react/eslint-presets.json +77 -0
  21. package/configurations/framework/react/manifest.toml +93 -0
  22. package/configurations/framework/react/rules/REACT.md +108 -0
  23. package/configurations/framework/react-dom/eslint-presets.json +110 -0
  24. package/configurations/framework/react-dom/manifest.toml +24 -0
  25. package/configurations/framework/react-native/manifest.toml +46 -0
  26. package/configurations/framework/react-native/rules/REACT-NATIVE.md +51 -0
  27. package/configurations/framework/site/manifest.toml +170 -0
  28. package/configurations/framework/site/rules/SITE.md +20 -0
  29. package/configurations/framework/svelte/eslint-presets.json +67 -0
  30. package/configurations/framework/svelte/manifest.toml +83 -0
  31. package/configurations/framework/svelte/rules/SVELTE.md +48 -0
  32. package/configurations/framework/vue/eslint-presets.json +180 -0
  33. package/configurations/framework/vue/manifest.toml +83 -0
  34. package/configurations/framework/vue/rules/VUE.md +41 -0
  35. package/configurations/general/commits/manifest.toml +111 -0
  36. package/configurations/general/commits/rules/GIT.md +31 -0
  37. package/configurations/general/coverage/manifest.toml +3 -0
  38. package/configurations/general/dependencies/manifest.toml +159 -0
  39. package/configurations/general/dependencies/rules/DEPENDENCIES.md +30 -0
  40. package/configurations/general/dependencies/syncpack.json +15 -0
  41. package/configurations/general/docs/manifest.toml +79 -0
  42. package/configurations/general/docs/rules/DOCS.md +86 -0
  43. package/configurations/general/duplication/manifest.toml +32 -0
  44. package/configurations/general/engineering/manifest.toml +8 -0
  45. package/configurations/general/engineering/rules/agent/PLANNING.md +42 -0
  46. package/configurations/general/engineering/rules/agent/SUPPRESSIONS.md +16 -0
  47. package/configurations/general/engineering/rules/agent/TALKING.md +3 -0
  48. package/configurations/general/engineering/rules/agent/TASKS.md +19 -0
  49. package/configurations/general/engineering/rules/agent/WORKING.md +83 -0
  50. package/configurations/general/engineering/rules/code/ACCESSIBILITY.md +32 -0
  51. package/configurations/general/engineering/rules/code/CLI.md +37 -0
  52. package/configurations/general/engineering/rules/code/COMMENTS.md +38 -0
  53. package/configurations/general/engineering/rules/code/CONFIGURATION.md +25 -0
  54. package/configurations/general/engineering/rules/code/ERRORS.md +49 -0
  55. package/configurations/general/engineering/rules/code/HTTP.md +46 -0
  56. package/configurations/general/engineering/rules/code/LOGGING.md +55 -0
  57. package/configurations/general/engineering/rules/code/TESTING.md +58 -0
  58. package/configurations/general/files/manifest.toml +141 -0
  59. package/configurations/general/files/rules/YAML.md +19 -0
  60. package/configurations/general/format/manifest.toml +152 -0
  61. package/configurations/general/gspot/manifest.toml +65 -0
  62. package/configurations/general/gspot/rules/GENERATED.md +10 -0
  63. package/configurations/general/licenses/manifest.toml +33 -0
  64. package/configurations/general/naming/defaults.json +423 -0
  65. package/configurations/general/naming/manifest.toml +35 -0
  66. package/configurations/general/naming/rules/NAMING.md +179 -0
  67. package/configurations/general/prose/manifest.toml +86 -0
  68. package/configurations/general/prose/rules/WRITING.md +31 -0
  69. package/configurations/general/prose/vale/styles/LICENSES.md +55 -0
  70. package/configurations/general/prose/vale/styles/gspot/ampm.yml +8 -0
  71. package/configurations/general/prose/vale/styles/gspot/conscious-language.yml +16 -0
  72. package/configurations/general/prose/vale/styles/gspot/contractions.yml +43 -0
  73. package/configurations/general/prose/vale/styles/gspot/currency.yml +8 -0
  74. package/configurations/general/prose/vale/styles/gspot/dashes.yml +8 -0
  75. package/configurations/general/prose/vale/styles/gspot/date-ordinals.yml +41 -0
  76. package/configurations/general/prose/vale/styles/gspot/dates.yml +7 -0
  77. package/configurations/general/prose/vale/styles/gspot/file-paths.yml +7 -0
  78. package/configurations/general/prose/vale/styles/gspot/future.yml +17 -0
  79. package/configurations/general/prose/vale/styles/gspot/hedging.yml +22 -0
  80. package/configurations/general/prose/vale/styles/gspot/history.yml +16 -0
  81. package/configurations/general/prose/vale/styles/gspot/idioms.yml +21 -0
  82. package/configurations/general/prose/vale/styles/gspot/interface-verbs.yml +11 -0
  83. package/configurations/general/prose/vale/styles/gspot/jargon.yml +11 -0
  84. package/configurations/general/prose/vale/styles/gspot/leading-conjunctions.yml +12 -0
  85. package/configurations/general/prose/vale/styles/gspot/link-text.yml +8 -0
  86. package/configurations/general/prose/vale/styles/gspot/locations.yml +14 -0
  87. package/configurations/general/prose/vale/styles/gspot/marketing.yml +26 -0
  88. package/configurations/general/prose/vale/styles/gspot/merge-conflict-markers.yml +13 -0
  89. package/configurations/general/prose/vale/styles/gspot/militaristic-language.yml +22 -0
  90. package/configurations/general/prose/vale/styles/gspot/modals.yml +9 -0
  91. package/configurations/general/prose/vale/styles/gspot/numbered-units.yml +18 -0
  92. package/configurations/general/prose/vale/styles/gspot/obvious-fields.yml +14 -0
  93. package/configurations/general/prose/vale/styles/gspot/ordinal-adverbs.yml +15 -0
  94. package/configurations/general/prose/vale/styles/gspot/percentage-numbers.yml +8 -0
  95. package/configurations/general/prose/vale/styles/gspot/placeholders.yml +7 -0
  96. package/configurations/general/prose/vale/styles/gspot/product-centric-writing.yml +8 -0
  97. package/configurations/general/prose/vale/styles/gspot/punctuated-headings.yml +11 -0
  98. package/configurations/general/prose/vale/styles/gspot/self-reference.yml +15 -0
  99. package/configurations/general/prose/vale/styles/gspot/session-identifiers.yml +11 -0
  100. package/configurations/general/prose/vale/styles/gspot/since.yml +6 -0
  101. package/configurations/general/prose/vale/styles/gspot/straight-quotes.yml +11 -0
  102. package/configurations/general/prose/vale/styles/gspot/suspended-hyphens.yml +8 -0
  103. package/configurations/general/prose/vale/styles/gspot/symbols.yml +8 -0
  104. package/configurations/general/prose/vale/styles/gspot/time-ranges.yml +14 -0
  105. package/configurations/general/prose/vale/styles/gspot/url-prepositions.yml +10 -0
  106. package/configurations/general/prose/vale/styles/gspot/version-range.yml +8 -0
  107. package/configurations/general/repository/manifest.toml +24 -0
  108. package/configurations/general/secrets/gitleaks.toml +2 -0
  109. package/configurations/general/secrets/manifest.toml +125 -0
  110. package/configurations/general/secrets/rules/SECRETS.md +13 -0
  111. package/configurations/general/security/manifest.toml +77 -0
  112. package/configurations/general/security/rules/SECURITY.md +55 -0
  113. package/configurations/general/spelling/manifest.toml +46 -0
  114. package/configurations/general/structure/manifest.toml +70 -0
  115. package/configurations/infrastructure/ansible/manifest.toml +33 -0
  116. package/configurations/infrastructure/docker/manifest.toml +127 -0
  117. package/configurations/infrastructure/docker/rules/DOCKER.md +135 -0
  118. package/configurations/infrastructure/docker/trivyignore +2 -0
  119. package/configurations/infrastructure/github-actions/manifest.toml +76 -0
  120. package/configurations/infrastructure/github-actions/rules/GITHUB-ACTIONS.md +43 -0
  121. package/configurations/infrastructure/github-actions/zizmor.yml +3 -0
  122. package/configurations/infrastructure/nginx/manifest.toml +51 -0
  123. package/configurations/infrastructure/nginx/rules/NGINX.md +38 -0
  124. package/configurations/infrastructure/openapi/manifest.toml +50 -0
  125. package/configurations/infrastructure/openapi/rules/OPENAPI.md +39 -0
  126. package/configurations/infrastructure/xcode/manifest.toml +131 -0
  127. package/configurations/infrastructure/xcode/rules/XCODE.md +34 -0
  128. package/configurations/language/bash/manifest.toml +261 -0
  129. package/configurations/language/bash/rules/BASH.md +106 -0
  130. package/configurations/language/bash/rules/LANGUAGE.md +213 -0
  131. package/configurations/language/bash/rules/NAMING.md +62 -0
  132. package/configurations/language/bash/rules/OPERATIONS.md +77 -0
  133. package/configurations/language/bash/rules/SAFETY.md +222 -0
  134. package/configurations/language/bash/semgrep/bash.yml +30 -0
  135. package/configurations/language/css/manifest.toml +98 -0
  136. package/configurations/language/css/rules/CSS.md +28 -0
  137. package/configurations/language/css/rules/NAMING.md +17 -0
  138. package/configurations/language/css/rules/TAILWIND.md +26 -0
  139. package/configurations/language/css/stylelint-rule-names.json +89 -0
  140. package/configurations/language/html/manifest.toml +59 -0
  141. package/configurations/language/html/rules/HTML.md +27 -0
  142. package/configurations/language/html/rules/NAMING.md +16 -0
  143. package/configurations/language/javascript/eslint-presets.json +997 -0
  144. package/configurations/language/javascript/eslint-rule-names.json +299 -0
  145. package/configurations/language/javascript/eslint-runtime-names.json +61 -0
  146. package/configurations/language/javascript/manifest.toml +393 -0
  147. package/configurations/language/javascript/rules/BUN.md +13 -0
  148. package/configurations/language/javascript/rules/COMPONENTS.md +18 -0
  149. package/configurations/language/javascript/rules/DENO.md +15 -0
  150. package/configurations/language/javascript/rules/JAVASCRIPT.md +60 -0
  151. package/configurations/language/javascript/rules/NAMING.md +31 -0
  152. package/configurations/language/javascript/rules/NODE.md +21 -0
  153. package/configurations/language/javascript/rules/PLAYWRIGHT.md +34 -0
  154. package/configurations/language/javascript/semgrep/javascript.yml +84 -0
  155. package/configurations/language/markdown/manifest.toml +85 -0
  156. package/configurations/language/markdown/markdownlint-cli2.mjs +19 -0
  157. package/configurations/language/python/manifest.toml +621 -0
  158. package/configurations/language/python/rules/DESIGN.md +136 -0
  159. package/configurations/language/python/rules/FLOW.md +124 -0
  160. package/configurations/language/python/rules/NAMING.md +53 -0
  161. package/configurations/language/python/rules/PACKAGING.md +49 -0
  162. package/configurations/language/python/rules/PYTHON.md +136 -0
  163. package/configurations/language/python/rules/TYPING.md +132 -0
  164. package/configurations/language/sql/manifest.toml +68 -0
  165. package/configurations/language/sql/rules/NAMING.md +90 -0
  166. package/configurations/language/sql/rules/SQL.md +9 -0
  167. package/configurations/language/swift/manifest.toml +164 -0
  168. package/configurations/language/swift/rules/NAMING.md +88 -0
  169. package/configurations/language/swift/rules/SWIFT.md +134 -0
  170. package/configurations/language/swift/rules/SWIFTUI.md +61 -0
  171. package/configurations/language/swift/rules/UIKIT.md +99 -0
  172. package/configurations/language/swift/semgrep/swift.yml +126 -0
  173. package/configurations/language/typescript/eslint-presets.json +215 -0
  174. package/configurations/language/typescript/manifest.toml +72 -0
  175. package/configurations/language/typescript/rules/NAMING.md +73 -0
  176. package/configurations/language/typescript/rules/TYPESCRIPT.md +79 -0
  177. package/configurations/library/drizzle/manifest.toml +68 -0
  178. package/configurations/library/drizzle/rules/DRIZZLE.md +44 -0
  179. package/configurations/library/react-hook-form/manifest.toml +15 -0
  180. package/configurations/library/react-hook-form/rules/REACT-HOOK-FORM.md +48 -0
  181. package/configurations/library/swift-snapshot-testing/manifest.toml +32 -0
  182. package/configurations/library/tanstack-query/eslint-presets.json +21 -0
  183. package/configurations/library/tanstack-query/manifest.toml +26 -0
  184. package/configurations/library/tanstack-query/rules/TANSTACK-QUERY.md +41 -0
  185. package/configurations/library/testing-library/eslint-presets.json +191 -0
  186. package/configurations/library/testing-library/manifest.toml +47 -0
  187. package/configurations/library/translations/manifest.toml +40 -0
  188. package/configurations/library/translations/rules/NEXT-INTL.md +33 -0
  189. package/configurations/library/translations/rules/TRANSLATIONS.md +102 -0
  190. package/configurations/library/trpc/manifest.toml +14 -0
  191. package/configurations/library/trpc/rules/TRPC.md +43 -0
  192. package/configurations/library/zod/manifest.toml +25 -0
  193. package/configurations/library/zod/rules/ZOD.md +44 -0
  194. package/configurations/library/zustand/manifest.toml +18 -0
  195. package/configurations/library/zustand/rules/ZUSTAND.md +106 -0
  196. package/configurations/platform/cloudflare/manifest.toml +94 -0
  197. package/configurations/platform/cloudflare/rules/CLOUDFLARE.md +23 -0
  198. package/configurations/platform/cloudflare/semgrep/cloudflare.yml +12 -0
  199. package/configurations/platform/supabase/manifest.toml +112 -0
  200. package/configurations/platform/supabase/rules/SUPABASE.md +129 -0
  201. package/configurations/platform/supabase/semgrep/supabase.yml +60 -0
  202. package/configurations/testing/jest/manifest.toml +54 -0
  203. package/configurations/testing/pytest/manifest.toml +53 -0
  204. package/configurations/testing/swift-tests/manifest.toml +52 -0
  205. package/configurations/testing/swift-tests/rules/SWIFT-TESTS.md +79 -0
  206. package/configurations/testing/vitest/eslint-presets.json +22 -0
  207. package/configurations/testing/vitest/manifest.toml +69 -0
  208. package/configurations/testing/vitest/rules/VITEST.md +18 -0
  209. package/dist/LICENSE.md +201 -0
  210. package/dist/THIRD-PARTY-NOTICES.md +25 -0
  211. package/dist/eslint-rule-levels.json +10 -0
  212. package/dist/gspot.js +30740 -0
  213. package/dist/linkinator-program.js +65 -0
  214. package/dist/purgecss-program.js +51 -0
  215. package/dist/tool-versions.json +3 -0
  216. package/grammars/bash.wasm +0 -0
  217. package/grammars/css.wasm +0 -0
  218. package/grammars/html.wasm +0 -0
  219. package/grammars/javascript.wasm +0 -0
  220. package/grammars/licenses/tree-sitter-bash.txt +21 -0
  221. package/grammars/licenses/tree-sitter-css.txt +21 -0
  222. package/grammars/licenses/tree-sitter-html.txt +21 -0
  223. package/grammars/licenses/tree-sitter-javascript.txt +21 -0
  224. package/grammars/licenses/tree-sitter-python.txt +21 -0
  225. package/grammars/licenses/tree-sitter-swift.txt +21 -0
  226. package/grammars/licenses/tree-sitter-typescript.txt +21 -0
  227. package/grammars/python.wasm +0 -0
  228. package/grammars/swift.wasm +0 -0
  229. package/grammars/tsx.wasm +0 -0
  230. package/grammars/typescript.wasm +0 -0
  231. package/gspot.schema.json +45991 -0
  232. package/package.json +93 -5
@@ -0,0 +1,8 @@
1
+ extends: existence
2
+ message: "Link text '%s' says nothing. Name the destination."
3
+ level: error
4
+ ignorecase: true
5
+ scope: link
6
+ nonword: true
7
+ tokens:
8
+ - '^(?:here|this|this page|read more|more|click here|link|documentation|docs)$'
@@ -0,0 +1,14 @@
1
+ extends: existence
2
+ message: "Relative location '%s'. Name the thing, not where it sits."
3
+ level: error
4
+ ignorecase: true
5
+ tokens:
6
+ - see above
7
+ - see below
8
+ - as mentioned above
9
+ - as noted above
10
+ - as described below
11
+ - the following section
12
+ - the previous section
13
+ - later in this document
14
+ - earlier in this document
@@ -0,0 +1,26 @@
1
+ extends: existence
2
+ message: "Marketing word '%s'."
3
+ level: error
4
+ ignorecase: true
5
+ tokens:
6
+ - robust
7
+ - seamless
8
+ - seamlessly
9
+ - powerful
10
+ - easily
11
+ - simply
12
+ - elegant
13
+ - blazing
14
+ - cutting-edge
15
+ - state-of-the-art
16
+ - world-class
17
+ - best-in-class
18
+ - enhanced
19
+ - comprehensive
20
+ - leverage
21
+ - leverages
22
+ - leveraging
23
+ - streamline
24
+ - streamlined
25
+ - effortless
26
+ - effortlessly
@@ -0,0 +1,13 @@
1
+ # Adapted from RedHat.MergeConflictMarkers; see ../LICENSES.md.
2
+ extends: existence
3
+ scope: raw
4
+ level: error
5
+ nonword: true
6
+ link: https://redhat-documentation.github.io/vale-at-red-hat/reference-guide.html#merge-conflict-markers
7
+ message: Do not commit Git merge conflict markers in source code.
8
+ action:
9
+ name: remove
10
+ tokens:
11
+ - ^<{7}\s.*$
12
+ - ^={7}$
13
+ - ^>{7}\s.*$
@@ -0,0 +1,22 @@
1
+ # Adapted from Microsoft.Militaristic; see ../LICENSES.md.
2
+ extends: substitution
3
+ message: Consider '%s' instead of '%s'.
4
+ link: https://learn.microsoft.com/en-us/style-guide/militaristic-language
5
+ level: suggestion
6
+ ignorecase: true
7
+ action:
8
+ name: replace
9
+ swap:
10
+ (?:cyber ?)?kill chain: cyberattack chain
11
+ defense-in-depth approach: multilayered approach
12
+ external attack surface: external exposure
13
+ first line of defense: protection
14
+ frontline analysts: security analysts
15
+ locked down: secured
16
+ adversaries: threat actors
17
+ adversary: threat actor
18
+ attackers: cyberattackers
19
+ attacker: cyberattacker
20
+ blast radius: impact
21
+ fortifications: protection
22
+ frontlines: defense
@@ -0,0 +1,9 @@
1
+ extends: existence
2
+ message: "Modal verb '%s'. State the rule or the fact."
3
+ level: error
4
+ ignorecase: true
5
+ tokens:
6
+ - should
7
+ - could
8
+ - would
9
+ - might
@@ -0,0 +1,18 @@
1
+ # Adapted from Microsoft.Units; see ../LICENSES.md.
2
+ extends: existence
3
+ message: "Write the number in '%s' as digits."
4
+ link: https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/term-collections/units-of-measure-terms
5
+ level: error
6
+ ignorecase: true
7
+ raw:
8
+ - \b(?:one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen|twenty|thirty|forty|fifty|sixty|seventy|eighty|ninety|hundred|thousand|million|billion)\s
9
+ tokens:
10
+ - (?:centi|milli)?meters
11
+ - (?:kilo)?grams
12
+ - (?:kilo)?meters
13
+ - (?:mega)?pixels
14
+ - cm
15
+ - inches
16
+ - lb
17
+ - miles
18
+ - pounds
@@ -0,0 +1,14 @@
1
+ # Adapted from RedHat.ObviousTerms; see ../LICENSES.md.
2
+ extends: existence
3
+ level: suggestion
4
+ message: Consider not documenting %s because it is self-explanatory.
5
+ scope: sentence
6
+ action:
7
+ name: remove
8
+ tokens:
9
+ - Description field
10
+ - Mail field
11
+ - Name field
12
+ - Password field
13
+ - User field
14
+ - Username field
@@ -0,0 +1,15 @@
1
+ # Adapted from Microsoft.Ordinal; see ../LICENSES.md.
2
+ extends: existence
3
+ message: 'Do not add -ly to an ordinal number.'
4
+ link: https://learn.microsoft.com/en-us/style-guide/numbers
5
+ level: error
6
+ ignorecase: true
7
+ action:
8
+ name: edit
9
+ params:
10
+ - trim
11
+ - ly
12
+ tokens:
13
+ - firstly
14
+ - secondly
15
+ - thirdly
@@ -0,0 +1,8 @@
1
+ # Adapted from Microsoft.Percentages; see ../LICENSES.md.
2
+ extends: existence
3
+ message: Use a numeral plus the units.
4
+ link: https://learn.microsoft.com/en-us/style-guide/numbers
5
+ nonword: true
6
+ level: error
7
+ tokens:
8
+ - \b[a-zA-Z]+\spercent\b
@@ -0,0 +1,7 @@
1
+ extends: existence
2
+ message: "Placeholder style '%s'. Use <kebab-case> in angle brackets."
3
+ level: error
4
+ nonword: true
5
+ tokens:
6
+ - "\\bYOUR_[A-Z_]+\\b"
7
+ - "\\{\\{?[a-z_]+\\}\\}?"
@@ -0,0 +1,8 @@
1
+ # Adapted from RedHat.ProductCentricWriting; see ../LICENSES.md.
2
+ extends: existence
3
+ ignorecase: true
4
+ level: suggestion
5
+ link: https://redhat-documentation.github.io/vale-at-red-hat/reference-guide.html#product-centric-writing
6
+ message: "Use a person or a role as the subject, not '%s'."
7
+ tokens:
8
+ - (allows?|enables?|lets?|permits?)\s(you|customers|the customer|the user|users)
@@ -0,0 +1,11 @@
1
+ # Adapted from RedHat.HeadingPunctuation; see ../LICENSES.md.
2
+ extends: existence
3
+ level: warning
4
+ link: https://redhat-documentation.github.io/vale-at-red-hat/reference-guide.html#heading-punctuation
5
+ message: Do not use end punctuation in headings.
6
+ nonword: true
7
+ scope: heading
8
+ action:
9
+ name: remove
10
+ tokens:
11
+ - (?<![a-z0-9])\.$|\?$|(?<!\w)!$
@@ -0,0 +1,15 @@
1
+ extends: existence
2
+ message: "Self-referential opening '%s'. Start with the subject."
3
+ level: error
4
+ ignorecase: true
5
+ tokens:
6
+ - this document describes
7
+ - this guide explains
8
+ - this file describes
9
+ - in this document
10
+ - in this guide
11
+ - the purpose of this
12
+ - this topic
13
+ - this chapter
14
+ - this section
15
+ - this subsection
@@ -0,0 +1,11 @@
1
+ # Adapted from RedHat.SessionId; see ../LICENSES.md.
2
+ extends: existence
3
+ level: error
4
+ ignorecase: true
5
+ scope: raw
6
+ action:
7
+ name: remove
8
+ message: Do not publish URLs that contain session identifiers. Exposed session IDs enable session hijacking
9
+ and unauthorized account access.
10
+ tokens:
11
+ - '[&?](sessionId|seSessionId)=[0-9a-zA-Z-]{8,}'
@@ -0,0 +1,6 @@
1
+ extends: existence
2
+ message: "'since' is ambiguous between time and cause. Use 'because' or 'after'."
3
+ level: error
4
+ ignorecase: true
5
+ tokens:
6
+ - "(?<!@)\\bsince\\b"
@@ -0,0 +1,11 @@
1
+ # Adapted from RedHat.SmartQuotes; see ../LICENSES.md.
2
+ extends: substitution
3
+ message: Do not use smart quotation marks. Use %s rather than %s.
4
+ level: warning
5
+ nonword: true
6
+ scope: raw
7
+ action:
8
+ name: replace
9
+ swap:
10
+ ‘|’: "'"
11
+ “|”: '"'
@@ -0,0 +1,8 @@
1
+ # Adapted from Microsoft.Suspended; see ../LICENSES.md.
2
+ extends: existence
3
+ message: "Write each compound in full instead of '%s'."
4
+ link: https://learn.microsoft.com/en-us/style-guide/punctuation/dashes-hyphens/hyphens
5
+ ignorecase: true
6
+ level: warning
7
+ tokens:
8
+ - \w+- and \w+-
@@ -0,0 +1,8 @@
1
+ extends: existence
2
+ message: "Decorative symbol or emoji '%s'. Use words."
3
+ level: error
4
+ nonword: true
5
+ tokens:
6
+ - "[\\x{1F300}-\\x{1FAFF}\\x{2600}-\\x{27BF}]"
7
+ - "\\s(?:\\u2192|\\u2190|\\u21D2)\\s"
8
+ - "\\u2705|\\u274C|\\u26A0"
@@ -0,0 +1,14 @@
1
+ # Adapted from Microsoft.RangeTime; see ../LICENSES.md.
2
+ extends: existence
3
+ message: Use 'to' instead of a dash in '%s'.
4
+ link: https://learn.microsoft.com/en-us/style-guide/numbers
5
+ nonword: true
6
+ level: error
7
+ action:
8
+ name: edit
9
+ params:
10
+ - regex
11
+ - '[-–]'
12
+ - to
13
+ tokens:
14
+ - \b(?:AM|PM)\s?[-–]\s?.+(?:AM|PM)\b
@@ -0,0 +1,10 @@
1
+ # Adapted from Microsoft.URLFormat; see ../LICENSES.md.
2
+ extends: substitution
3
+ message: Use 'of' (not 'for') to describe the relationship of the word URL to a resource.
4
+ ignorecase: true
5
+ link: https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/u/url
6
+ level: suggestion
7
+ action:
8
+ name: replace
9
+ swap:
10
+ URL for: URL of
@@ -0,0 +1,8 @@
1
+ extends: existence
2
+ message: "Version range '%s'. Pin the version the rule applies to, or drop it."
3
+ level: error
4
+ nonword: true
5
+ tokens:
6
+ - "\\bv?\\d+\\.x\\b"
7
+ - "\\d+\\+ or (later|newer)"
8
+ - "(?<!\\bv?\\d+(?:\\.\\d+)*(?:-[\\w.-]+)?(?:\\+[\\w.-]+)?\\s+)\\bor (later|newer|higher)(?![-\\w])"
@@ -0,0 +1,24 @@
1
+ [configuration]
2
+ title = "Repository"
3
+ always_selected = true
4
+ description = "Checks the files that Git tracks and their storage."
5
+
6
+ [[check]]
7
+ name = "large-files"
8
+ example = "A tracked `notes/big.txt` containing 1,100 KiB exceeds the default 1,024 KiB ceiling and reports `size`. Remove accidental content or store a required large file through Git LFS. Generated and vendored classifications must describe the actual file ownership."
9
+ level = "recommended"
10
+ stage = "commit"
11
+ runs = "once"
12
+ summary = "Checks that every tracked file over the size limit is stored through LFS or declared with a reason."
13
+ why = "A large file in plain git history stays in every clone for good."
14
+ help = "Track the file with git lfs, classify it with gspot set generated `<path>` or gspot set vendored `<path>`, or raise limits.file_kb with a reason."
15
+
16
+ [[check]]
17
+ name = "tracked-files"
18
+ example = "A tracked .env or node_modules/example/index.js reports tracked-file. Add its path to .gitignore and run git rm --cached on that file, preserving its local contents."
19
+ level = "recommended"
20
+ stage = "commit"
21
+ runs = "once"
22
+ summary = "Checks tracked files against the paths that selected configurations declare untracked."
23
+ why = "Machine-local values and installed packages belong outside shared Git history."
24
+ help = "Add the reported file or folder to .gitignore and remove it from the index with git rm --cached."
@@ -0,0 +1,2 @@
1
+ [extend]
2
+ useDefault = true
@@ -0,0 +1,125 @@
1
+
2
+ [configuration]
3
+ title = "Secrets"
4
+ always_selected = true
5
+ description = "Checks environment files and examples, scans staged changes and pushed commits for secrets, and requires reasons for allowed values."
6
+
7
+ [files]
8
+ paths = ["**"]
9
+ kinds = ["source", "generated", "vendored", "binary"]
10
+
11
+ [[tool]]
12
+ name = "gitleaks"
13
+ version = "8.30.1"
14
+ min_version = "8.25.0"
15
+ mise = "gitleaks"
16
+ brew = "gitleaks"
17
+ github = { name = "gitleaks/gitleaks", version = "v8.30.1" }
18
+ winget = "Gitleaks.Gitleaks"
19
+ scoop = "gitleaks"
20
+ version_command = ["version"]
21
+ [[tool.replace]]
22
+ file = ".gitleaks.toml"
23
+ shared = false
24
+
25
+ [[tool.replace]]
26
+ file = "gitleaks.toml"
27
+ shared = false
28
+
29
+ [[tool]]
30
+ name = "trufflehog"
31
+ crash_pattern = '"level"\s*:\s*"error"'
32
+ version = "3.97.5"
33
+ mise = "trufflehog"
34
+ brew = "trufflehog"
35
+ github = { name = "trufflesecurity/trufflehog", version = "v3.97.5" }
36
+
37
+ [[tool]]
38
+ name = "dotenv-linter"
39
+ version = "4.0.0"
40
+ mise = "github:dotenv-linter/dotenv-linter"
41
+ brew = "dotenv-linter"
42
+ cargo = "dotenv-linter"
43
+ github = { name = "dotenv-linter/dotenv-linter", version = "v4.0.0" }
44
+
45
+ [[tool_file]]
46
+ source = "gitleaks.toml"
47
+ target = ".gspot/config/gitleaks.toml"
48
+ tool = "gitleaks"
49
+
50
+ [[check]]
51
+ name = "gitleaks-staged"
52
+ example = "A staged credential reports a secret finding. Remove the credential from source, load it from the configured environment owner, and stage the fix. If the credential has been exposed, rotate it at its provider."
53
+ level = "recommended"
54
+ stage = "commit"
55
+ runs = "once"
56
+ when = { git = true }
57
+ command = ["gitleaks", "git", "--staged", "--no-banner", "--redact", "--exit-code", "1", "--config", "{tool_file:gitleaks}", "--report-format", "json", "--report-path", "-", "{root}"]
58
+ output = { format = "json", fields = { file = "File", line = "StartLine", column = "StartColumn", rule = "Fingerprint", message = "Description" } }
59
+ summary = "Scans the staged change for keys, tokens, and passwords before the commit exists."
60
+ why = "A secret that reaches a commit stays in history after the line is deleted, and every clone holds it."
61
+ help = "Remove the value and load it from the environment. For a reviewed public value, use gspot ignore with its reported fingerprint and a reason."
62
+
63
+ [[check]]
64
+ name = "gitleaks-pushed"
65
+ example = "A credential in an earlier commit still reports after it is deleted from the working tree. Rotate the credential and remove it from the affected history, coordinating any rewrite of shared commits. Rerun the history scan."
66
+ level = "recommended"
67
+ stage = "push"
68
+ runs = "history"
69
+ when = { git = true }
70
+ tool = "gitleaks"
71
+ output = { format = "json", file_type = "history", fields = { file = "File", line = "StartLine", column = "StartColumn", rule = "Fingerprint", message = "Description" } }
72
+ summary = "Scans every commit about to be pushed for keys, tokens, and passwords."
73
+ why = "A commit made past the hook still reaches the shared branch unless the push checks it."
74
+ help = "Rewrite the commit that holds the value and rotate the secret. For a reviewed historical example, use gspot ignore secrets/gitleaks-pushed --rule `<fingerprint>` --reason \"...\"."
75
+
76
+ [[check]]
77
+ name = "gitleaks-files"
78
+ example = "In a folder with no git, a credential in a source file reports a secret finding. Remove the credential from source and load it from the configured environment owner. If the credential has been exposed, rotate it at its provider."
79
+ level = "recommended"
80
+ stage = "commit"
81
+ runs = "once"
82
+ when = { git = false }
83
+ command = ["gitleaks", "dir", "--no-banner", "--redact", "--exit-code", "1", "--config", "{tool_file:gitleaks}", "--report-format", "json", "--report-path", "-", "."]
84
+ output = { format = "json", fields = { file = "File", line = "StartLine", column = "StartColumn", rule = "Fingerprint", message = "Description" } }
85
+ summary = "Scans every file of a folder that has no git for keys, tokens, and passwords."
86
+ why = "Without git there is no staged change to scan, so the files themselves are the only place a secret can be caught."
87
+ help = "Remove the value and load it from the environment. For a reviewed public value, use gspot ignore with its reported fingerprint and a reason."
88
+
89
+ [[check]]
90
+ name = "trufflehog"
91
+ example = "A committed credential that its provider confirms as active reports a verified secret. Revoke or rotate it at the provider and remove it from the affected history."
92
+ level = "recommended"
93
+ stage = "push"
94
+ runs = "history"
95
+ needs = ["network"]
96
+ when = { git = true }
97
+ tool = "trufflehog"
98
+ exit_codes = [183]
99
+ output = { format = "trufflehog", file_type = "history" }
100
+ summary = "Verifies candidate secrets in the pushed commits against the service that issued them."
101
+ why = "A verified secret is live right now, which makes it the finding to act on first."
102
+ help = "Rotate the secret at its provider, then rewrite the commit that holds it."
103
+
104
+ [[check]]
105
+ name = "dotenv-linter"
106
+ example = "A dotenv file defining the same key twice reports a duplicate entry. Keep the intended assignment and remove the duplicate, preserving secret values outside version control."
107
+ level = "recommended"
108
+ stage = "commit"
109
+ command = ["dotenv-linter", "check", "--plain", "--skip-updates", "{files}"]
110
+ fix = ["dotenv-linter", "fix", "--plain", "--no-backup", "{files}"]
111
+ files = { filenames = [".env", ".dev.vars"], paths = [".env.*", "**/.env.*", ".dev.vars.*", "**/.dev.vars.*"] }
112
+ output = { format = "regex", pattern = "^(?<file>[^:]+):(?<line>\\d+) (?<rule>[A-Za-z]+): (?<message>.*)$" }
113
+ summary = "Checks every tracked environment file: key format, duplicates, quoting, ordering, and trailing spaces."
114
+ why = "A tracked environment file is a template other people copy; a malformed line there is copied into every machine."
115
+ help = "Run gspot check --fix, or fix the line dotenv-linter names."
116
+
117
+ [[check]]
118
+ name = "env-examples"
119
+ example = "Source code reading `API_URL` while the example environment file omits that key reports a missing example entry. Add `API_URL=` to `.env.example` and document the required value without committing credentials."
120
+ level = "recommended"
121
+ stage = "push"
122
+ runs = "scope"
123
+ summary = "When an example environment file exists, checks static uppercase keys read through process.env, import.meta.env, Bun.env, Deno.env.get, Python os APIs, and declared reader functions in JavaScript, TypeScript, Python, and component files."
124
+ why = "A variable missing from the example file is the one a new machine lacks on its first run."
125
+ help = "Add the key to the example file (.env.example or the files under secrets.env_examples), or stop reading it."
@@ -0,0 +1,13 @@
1
+ # Secrets
2
+
3
+ - Never hardcode API keys, tokens, passwords, or secrets anywhere in the codebase.
4
+ - Read secrets from the environment or a secret store in one configuration module. A secret has
5
+ no fallback or default value.
6
+ - Never pass a secret in a command-line flag; other processes can read the process arguments.
7
+ - Builds copy public build-time variables such as `NEXT_PUBLIC_*` and `VITE_*` into the bundle. They hold
8
+ nothing secret.
9
+ - Examples, documentation, templates, and sample files hold placeholders, never real secrets.
10
+ - Keep actual local overrides in an ignored file.
11
+ - Never log secrets, tokens, passwords, cookies, authorization headers, or connection strings.
12
+ - A published package lists its files explicitly; an ignored file can still leak through the
13
+ defaults of a packaging tool.
@@ -0,0 +1,77 @@
1
+ allowed_words = ["Semgrep", "CodeQL"]
2
+ [configuration]
3
+ title = "Security"
4
+ always_selected = true
5
+ description = "Static analysis for security patterns with Semgrep over every file a selected language claims, and CodeQL for configured project languages."
6
+
7
+ [files]
8
+ languages = true
9
+ extensions = [".plist"]
10
+
11
+ [[tool]]
12
+ name = "semgrep"
13
+ version_command = ["--disable-version-check", "--version"]
14
+ suppression = { marker = "\\bnosemgrep\\b", reason = "reason: (?<reason>\\S.*)", forbidden = true }
15
+ version = "1.178.0"
16
+ min_version = "1.100.0"
17
+ pypi = "semgrep"
18
+ mise = "pipx:semgrep"
19
+ brew = "semgrep"
20
+ builds = ["macos", "linux"]
21
+ [[tool.replace]]
22
+ file = ".semgrepignore"
23
+ shared = false
24
+
25
+ [[tool]]
26
+ name = "codeql"
27
+ version = "2.24.3"
28
+ brew = "codeql"
29
+ github = { name = "github/codeql-cli-binaries", version = "v2.24.3" }
30
+ # The CLI ships for x64 Linux only; its bundled Java does not run on arm64.
31
+ builds = ["macos", "linux-x64", "windows"]
32
+ # Query versions paired with github/codeql tag codeql-cli/v2.24.3.
33
+ query_packs = { actions = "0.6.21", cpp = "1.5.12", csharp = "1.6.3", go = "1.5.7", java = "1.10.8", javascript = "2.3.3", python = "1.7.8", ruby = "1.5.8", rust = "0.1.28", swift = "1.2.17" }
34
+
35
+ [[tool_file]]
36
+ target = ".semgrepignore"
37
+ tool = "semgrep"
38
+ per_scope = true
39
+
40
+ [[check]]
41
+ name = "semgrep"
42
+ example = "Code matching a selected local Semgrep rule reports that rule ID and source location. For a rule banning dynamic evaluation, replace `eval(userInput)` with explicit parsing and permitted operations, then rerun the same rule set."
43
+ level = "recommended"
44
+ stage = "push"
45
+ exit_codes = [1, 3]
46
+ command = ["semgrep", "scan", "--strict", "--error", "--metrics", "off", "--disable-version-check", "--no-rewrite-rule-ids", "--quiet", "--json", "{files}"]
47
+ output = { format = "semgrep" }
48
+ summary = "Runs the Semgrep rule packs of the selected configurations, and the repository's own rules, over the changed files."
49
+ why = "An injection or a logged secret reads like ordinary code, and a pattern rule finds it before a reviewer has to."
50
+ help = "Change the code the way the message says. Turn one rule off for a path with gspot ignore security/semgrep --rule `<id>` --paths `<glob>` --reason \"`<why>`\"."
51
+
52
+ [[check]]
53
+ name = "semgrep-registry"
54
+ example = "Code matching a configured Semgrep registry rule reports its upstream rule ID. Correct the operation identified by that rule and rerun with network access. The configured rule set determines which patterns are findings."
55
+ level = "recommended"
56
+ stage = "manual"
57
+ exit_codes = [1, 3]
58
+ needs = ["network"]
59
+ when = { setting = "tools.semgrep.registry_packs" }
60
+ command = ["semgrep", "scan", "--strict", "{each:--config:tools.semgrep.registry_packs}", "--error", "--metrics", "off", "--disable-version-check", "--quiet", "--json", "{files}"]
61
+ tool = "semgrep"
62
+ output = { format = "semgrep" }
63
+ summary = "Runs the public Semgrep registry packs named in tools.semgrep.registry_packs, which the registry serves over the network."
64
+ why = "The registry packs cover the common vulnerability classes, and their license keeps them out of this package."
65
+ help = "Change the code the way the message says, or turn the rule off for a path with gspot ignore security/semgrep-registry --rule `<id>` --reason \"`<why>`\"."
66
+
67
+ [[check]]
68
+ name = "codeql"
69
+ example = "A query constructed by concatenating request input into SQL reports a SQL-injection finding when the selected language query pack detects the flow. Use a parameterized database query and rerun with the language build prerequisites satisfied."
70
+ level = "recommended"
71
+ stage = "manual"
72
+ runs = "once"
73
+ tool = "codeql"
74
+ when = { setting = "tools.codeql.languages" }
75
+ summary = "Builds a CodeQL database for every language in tools.codeql.languages and runs the security suite over it."
76
+ why = "Data-flow analysis follows a value from a request to a query across files, which a pattern rule cannot."
77
+ help = "Change the code the result names. Record a false positive with gspot ignore security/codeql --rule `<id>` --paths `<glob>` --reason \"`<why>`\"."
@@ -0,0 +1,55 @@
1
+ # Security
2
+
3
+ ## Input
4
+
5
+ - Validate every value that enters from outside the program before use: request bodies, query strings,
6
+ path parameters, headers, cookies, environment, files, provider responses, queue messages,
7
+ command-line arguments. A type annotation does not validate input.
8
+ - Bound every input: size, length, count, depth, rate.
9
+ - Reject unknown fields in request bodies that create or change data.
10
+
11
+ ## Never build code or paths from input
12
+
13
+ - No SQL, shell, file path, URL, HTML, regex, dynamic import, or template built by string
14
+ concatenation with untrusted input. Use parameters, argument arrays, path joins against a fixed
15
+ root with traversal checks, URL builders, and escaping for the output format.
16
+ - No `eval`, `new Function`, string timers, `exec` with a shell, or reflection driven by input.
17
+ - Deserialize only formats that cannot execute, such as JSON. Do not deserialize pickle or YAML with custom tags.
18
+
19
+ ## Web sinks
20
+
21
+ - Render untrusted content as text. When the page requires HTML, sanitize it in one module and add a
22
+ suppression with the reason there.
23
+ - Reject executable script URLs and untrusted inline code.
24
+ - Send security headers: HTTP Strict Transport Security (HSTS), `X-Content-Type-Options: nosniff`, frame policy, referrer policy,
25
+ and a Content Security Policy that the application's own scripts satisfy.
26
+
27
+ ## Redirects and outbound requests
28
+
29
+ - Redirect only to a relative path or an allowlisted origin.
30
+ - Outbound fetches to a user-influenced target check the host against an allowlist and reject
31
+ private, loopback, link-local, and metadata addresses, on every hop of a redirect chain.
32
+
33
+ ## Authentication and authorization
34
+
35
+ - Identity comes from a verified server-side session or token. A client-supplied user ID, role,
36
+ or tenant provides data, never authority.
37
+ - Authorize every operation that reads or changes data, through each HTTP, RPC, job,
38
+ and webhook entry point. Recheck access to the resource even when a parent already checked it.
39
+ - Compare secrets, signatures, and tokens in constant time.
40
+ - Generate tokens, nonces, and reset codes with the platform's cryptographic random source.
41
+ - Hash passwords with a current, slow, salted algorithm through a maintained library. Use one
42
+ failure message for unknown user and wrong password.
43
+ - Verify webhook signatures against the raw body before decoding, and handle replay with an
44
+ idempotency key.
45
+ - Cookies that carry sessions: `HttpOnly`, `Secure`, `SameSite`, explicit `Max-Age`, non-default
46
+ name. Writes never happen on `GET`. A cookie session needs CSRF protection on every
47
+ state-changing request.
48
+
49
+ ## Builds
50
+
51
+ - No default credentials, sample admin users, debug endpoints, or auth bypasses in any build.
52
+
53
+ ## Supply chain
54
+
55
+ - Verify checksums or signatures of downloaded binaries. Never pipe a download into an interpreter.
@@ -0,0 +1,46 @@
1
+ [configuration]
2
+ title = "Spelling"
3
+ always_selected = true
4
+ description = "typos over every text file, with the words this repository allows and the reason for each."
5
+
6
+ [files]
7
+ paths = ["**"]
8
+
9
+ [[tool]]
10
+ name = "typos"
11
+ version = "1.43.5"
12
+ mise = "typos"
13
+ brew = "typos-cli"
14
+ cargo = "typos-cli"
15
+ winget = "crate-ci.typos"
16
+ scoop = "typos"
17
+ github = { name = "crate-ci/typos", version = "v1.43.5" }
18
+ [[tool.replace]]
19
+ file = "typos.toml"
20
+ shared = false
21
+
22
+ [[tool.replace]]
23
+ file = ".typos.toml"
24
+ shared = false
25
+
26
+ [[tool.replace]]
27
+ file = "_typos.toml"
28
+ shared = false
29
+
30
+ [[tool_file]]
31
+ target = ".gspot/config/typos.toml"
32
+ tool = "typos"
33
+ per_scope = true
34
+
35
+ [[check]]
36
+ name = "typos"
37
+ example = "A misspelled word in selected text reports a spelling finding. Correct it and rerun. Filename findings require a manual rename and reference updates."
38
+ level = "recommended"
39
+ stage = "commit"
40
+ command = ["typos", "--isolated", "--config", "{tool_file:typos}", "--force-exclude", "--format", "json", "--color", "never", "{files}"]
41
+ fix = ["typos", "--isolated", "--config", "{tool_file:typos}", "--force-exclude", "--no-check-filenames", "--write-changes", "--color", "never", "{files}"]
42
+ exit_codes = [2]
43
+ output = { format = "typos" }
44
+ summary = "Finds misspelled words in code, comments, and documentation."
45
+ why = "A typo in an identifier spreads to every caller; in prose it costs the reader a second look."
46
+ help = "Fix the spelling, or write the real name and its reason in the root allowed_words setting."