@produtype/core 0.88.0 → 0.89.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/dist/analyzer/detectAuth.js +33 -4
- package/package.json +1 -1
|
@@ -74,6 +74,22 @@ async function detectAuth(ctx) {
|
|
|
74
74
|
'passport',
|
|
75
75
|
]);
|
|
76
76
|
const managedAuthPyDeps = (0, detectContext_1.hasAnyPyDep)(ctx, ['django-allauth', 'authlib', 'python-jose', 'fastapi-users', 'flask-login']);
|
|
77
|
+
/** Identity handed to somebody else, in every ecosystem this analyzer reads. */
|
|
78
|
+
const externalIdentityProviders = [
|
|
79
|
+
...managedAuthDeps,
|
|
80
|
+
...(0, detectContext_1.hasAnyPyDep)(ctx, ['django-allauth', 'authlib', 'social-auth-app-django']),
|
|
81
|
+
...(0, detectContext_1.hasAnyRustDep)(ctx, ['oauth2', 'openidconnect']),
|
|
82
|
+
...(0, detectContext_1.hasAnyGradleDep)(ctx, ['spring-boot-starter-oauth2-client', 'com.okta.spring']),
|
|
83
|
+
...(0, detectContext_1.hasAnyDotnetDep)(ctx, ['Microsoft.AspNetCore.Authentication.OpenIdConnect', 'Microsoft.Identity.Web']),
|
|
84
|
+
];
|
|
85
|
+
/** And a password of its own, which is what makes a reset flow something to have. */
|
|
86
|
+
const storesAPasswordItself = [
|
|
87
|
+
...(0, detectContext_1.hasAnyDep)(ctx, ['bcrypt', 'bcryptjs', 'argon2', 'scrypt-kdf', 'passport-local']),
|
|
88
|
+
...(0, detectContext_1.hasAnyPyDep)(ctx, ['django', 'passlib', 'bcrypt', 'argon2-cffi', 'werkzeug']),
|
|
89
|
+
...(0, detectContext_1.hasAnyRustDep)(ctx, ['argon2', 'rust-argon2', 'bcrypt', 'scrypt', 'password-hash', 'pbkdf2']),
|
|
90
|
+
...(0, detectContext_1.hasAnyGradleDep)(ctx, ['spring-security-crypto', 'org.mindrot:jbcrypt']),
|
|
91
|
+
...(0, detectContext_1.hasAnyDotnetDep)(ctx, ['Microsoft.AspNetCore.Identity']),
|
|
92
|
+
];
|
|
77
93
|
/**
|
|
78
94
|
* The packages that do the authenticating, as distinct from the words people use
|
|
79
95
|
* around them.
|
|
@@ -399,12 +415,25 @@ async function detectAuth(ctx) {
|
|
|
399
415
|
// makes password reset not applicable rather than missing — there is no
|
|
400
416
|
// password to reset.
|
|
401
417
|
key: 'auth.externalIdentityOnly',
|
|
402
|
-
|
|
403
|
-
|
|
418
|
+
/**
|
|
419
|
+
* Read from npm alone, so only a JavaScript project could ever reach it.
|
|
420
|
+
*
|
|
421
|
+
* crates.io authenticates through GitHub and nothing else: `oauth2` in its
|
|
422
|
+
* Cargo.toml, no password-hashing crate anywhere, no reset route. It was told
|
|
423
|
+
* at `high` to build a password reset flow for passwords it does not have.
|
|
424
|
+
*
|
|
425
|
+
* The disqualifying half matters more than the qualifying one, so it is the
|
|
426
|
+
* wider of the two: anything that hashes a password, in any of these
|
|
427
|
+
* ecosystems, means there is a password to reset. Django is on that list as
|
|
428
|
+
* itself — `django-allauth` sits on top of Django's own user model, and those
|
|
429
|
+
* projects can almost always reset a password.
|
|
430
|
+
*/
|
|
431
|
+
present: externalIdentityProviders.length > 0 &&
|
|
432
|
+
storesAPasswordItself.length === 0 &&
|
|
404
433
|
passwordResetSignals.length === 0 &&
|
|
405
434
|
passwordResetFiles.length === 0,
|
|
406
|
-
evidence: depEvidence(
|
|
407
|
-
details: { managedProviders:
|
|
435
|
+
evidence: depEvidence(externalIdentityProviders),
|
|
436
|
+
details: { managedProviders: externalIdentityProviders.length },
|
|
408
437
|
},
|
|
409
438
|
{
|
|
410
439
|
key: 'auth.2fa',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@produtype/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.89.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": {
|