@produtype/core 0.96.0 → 0.97.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.
|
@@ -195,6 +195,21 @@ async function detectSecurity(ctx) {
|
|
|
195
195
|
/^\s*SECURE_REFERRER_POLICY\s*=/m,
|
|
196
196
|
/^\s*SECURE_CROSS_ORIGIN_OPENER_POLICY\s*=/m,
|
|
197
197
|
/^\s*CSP_DEFAULT_SRC\s*=/m,
|
|
198
|
+
/**
|
|
199
|
+
* Rails writes its header policy as Ruby, not as a header name.
|
|
200
|
+
*
|
|
201
|
+
* `config.content_security_policy do |policy|` in an initializer is the policy
|
|
202
|
+
* itself, and `config.force_ssl = true` is what turns on Strict-Transport-Security
|
|
203
|
+
* for the whole application. lobsters has both and was told at `high` to add
|
|
204
|
+
* security headers.
|
|
205
|
+
*
|
|
206
|
+
* Both are lines somebody chose to write. Rails' *default* headers —
|
|
207
|
+
* `X-Frame-Options: SAMEORIGIN`, nosniff, and the rest of `DefaultHeaders` —
|
|
208
|
+
* are not counted, for the reason Django's `SecurityMiddleware` is not: every
|
|
209
|
+
* application has them, so they distinguish nothing.
|
|
210
|
+
*/
|
|
211
|
+
/config\.content_security_policy\b/,
|
|
212
|
+
/^\s*config\.force_ssl\s*=\s*true/m,
|
|
198
213
|
], 20);
|
|
199
214
|
/**
|
|
200
215
|
* Spring Security, which writes the headers without being asked.
|
|
@@ -256,7 +271,15 @@ async function detectSecurity(ctx) {
|
|
|
256
271
|
(0, detectContext_1.hasDep)(ctx, 'rate-limiter-flexible') ||
|
|
257
272
|
(0, detectContext_1.hasDep)(ctx, 'next-rate-limit') ||
|
|
258
273
|
(0, detectContext_1.hasAnyPyDep)(ctx, ['django-ratelimit', 'slowapi', 'flask-limiter']).length > 0 ||
|
|
259
|
-
(0, detectContext_1.hasAnyRustDep)(ctx, ['governor', 'tower_governor', 'tower-governor', 'actix-governor', 'ratelimit']).length > 0
|
|
274
|
+
(0, detectContext_1.hasAnyRustDep)(ctx, ['governor', 'tower_governor', 'tower-governor', 'actix-governor', 'ratelimit']).length > 0 ||
|
|
275
|
+
/**
|
|
276
|
+
* Ruby's, which is one gem and nearly universal in Rails.
|
|
277
|
+
*
|
|
278
|
+
* lobsters declares `gem "rack-attack" # rate-limiting` and was told at `high`
|
|
279
|
+
* that it does not throttle. The list had grown npm, Python and Rust entries and
|
|
280
|
+
* skipped the ecosystem where the answer is a single well-known name.
|
|
281
|
+
*/
|
|
282
|
+
(0, detectContext_1.hasAnyRubyDep)(ctx, ['rack-attack', 'rack_attack']).length > 0;
|
|
260
283
|
/**
|
|
261
284
|
* Throttling by what the protocol says, not by what the variable is called.
|
|
262
285
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@produtype/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.97.0",
|
|
4
4
|
"description": "Deterministic CLI and library that analyzes a web application repository and reports how far it is from production-ready for the kind of product it is meant to be.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|