← Back to Pull requests

[ELY-2370] Move appropriate methods to the JaasRealmIdentity class from JaasSecurityRealm class #1746

Merged
Kshitiz-Mhto merged 1 files (91 lines) on Oct 07, 2022 20:37 UTC
View on GitHub
Kshitiz-Mhto Kshitiz-Mhto commented on Sep 04, 2022 13:06 UTC
Author

Issue: ELY-2370

Diff: 91 lines (+46 / -45) across 1 files Reviewer: skyllarr Review duration: 47970m
All Vouch review confidence checks passed
Residual risk 0.05 = Change Risk (0.53) × (1 − Review Confidence (0.90)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.53 · 91 lines diff across 1 files
0.53
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.89 · 5 substantive comment(s)
0.89
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
89%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.271
Sensitive Paths sensitive_paths
0.053
Real PR Conversation Timeline
15 items
skyllarr skyllarr commented on code on Sep 05, 2022 10:17 UTC
Code Review
auth/realm/base/src/main/java/org/wildfly/security/auth/realm/JaasSecurityRealm.java:1
@@ -148,54 +148,10 @@ public SupportLevel getEvidenceVerifySupport(final Class<? extends Evidence> evi
         return SupportLevel.POSSIBLY_SUPPORTED;
     }
 
-    /**
-     * @param entry           login configuration file entry
-     * @param subject         classLoader to use with LoginContext, this class loader must contain LoginModule CallbackHandler classes
-     * @param callbackHandler callbackHandler to pass to LoginContext
-     * @return the instance of LoginContext
-     * @throws RealmUnavailableException
-     */
-    private LoginContext createLoginContext(final String entry, final Subject subject, final CallbackHandler callbackHandler) throws RealmUnavailableException {
-        if (jaasConfigFilePath != null) {
-            File file = new File(this.jaasConfigFilePath);
-            if (!file.exists() && !file.isDirectory()) {
-                throw ElytronMessages.log.failedToLoadJaasConfigFile();
-            }
-        }
-        try {
-            if (jaasConfigFilePath == null) {
-                return new LoginContext(entry, subject, callbackHandler);
-            } else {
-                return new LoginContext(entry, subject, callbackHandler, Configuration.getInstance(DEFAULT_CONFIGURATION_POLICY_TYPE, new URIParameter(jaasConfigFilePath)));
-            }
-        } catch (LoginException | NoSuchAlgorithmException le) {
-            throw ElytronMessages.log.failedToCreateLoginContext(le);
-        }
-    }
-
-    private CallbackHandler createCallbackHandler(final Principal principal, final Evidence evidence) {
-        if (handler != null) {
-            try {
-                final CallbackHandler callbackHandler = handler.getClass().getConstructor().newInstance();
-                // custom handlers were allowed in the past as long as they had a public setSecurityInfo method. Use this method if it exists
-                final Method setSecurityInfo = handler.getClass().getMethod("setSecurityInfo", Principal.class, Object.class);
-                setSecurityInfo.invoke(callbackHandler, principal, evidence);
-                return callbackHandler;
-            } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
-                // ignore if this method does not exist
-                return handler;
-            }
-        } else if (Security.getProperty("auth.login.defaultCallbackHandler") != null) {
-            // security property "auth.login.defaultCallbackHandler" is not null so LoginContext will initialize it itself
-            return null;
-        } else {
-            return new JaasSecurityRealmDefaultCallbackHandler(principal, evidence);
-        }
-    }
-
     private class JaasRealmIdentity implements RealmIdentity {
 
         private final Principal principal;
+        private URI jaasConfigFilePath;

@Kshitiz-Mhto Thank you for the PR! Just a minor, this should not be added here, rather this class should use jaasConfigFilePath from its parent. You can try running mvn clean install locally to see if your changes pass.

skyllarr skyllarr commented on code on Sep 07, 2022 09:08 UTC
Code Review
auth/realm/base/src/main/java/org/wildfly/security/auth/realm/JaasSecurityRealm.java:1
@@ -148,54 +148,10 @@ public SupportLevel getEvidenceVerifySupport(final Class<? extends Evidence> evi
         return SupportLevel.POSSIBLY_SUPPORTED;
     }
 
-    /**
-     * @param entry           login configuration file entry
-     * @param subject         classLoader to use with LoginContext, this class loader must contain LoginModule CallbackHandler classes
-     * @param callbackHandler callbackHandler to pass to LoginContext
-     * @return the instance of LoginContext
-     * @throws RealmUnavailableException
-     */
-    private LoginContext createLoginContext(final String entry, final Subject subject, final CallbackHandler callbackHandler) throws RealmUnavailableException {
-        if (jaasConfigFilePath != null) {
-            File file = new File(this.jaasConfigFilePath);
-            if (!file.exists() && !file.isDirectory()) {
-                throw ElytronMessages.log.failedToLoadJaasConfigFile();
-            }
-        }
-        try {
-            if (jaasConfigFilePath == null) {
-                return new LoginContext(entry, subject, callbackHandler);
-            } else {
-                return new LoginContext(entry, subject, callbackHandler, Configuration.getInstance(DEFAULT_CONFIGURATION_POLICY_TYPE, new URIParameter(jaasConfigFilePath)));
-            }
-        } catch (LoginException | NoSuchAlgorithmException le) {
-            throw ElytronMessages.log.failedToCreateLoginContext(le);
-        }
-    }
-
-    private CallbackHandler createCallbackHandler(final Principal principal, final Evidence evidence) {
-        if (handler != null) {
-            try {
-                final CallbackHandler callbackHandler = handler.getClass().getConstructor().newInstance();
-                // custom handlers were allowed in the past as long as they had a public setSecurityInfo method. Use this method if it exists
-                final Method setSecurityInfo = handler.getClass().getMethod("setSecurityInfo", Principal.class, Object.class);
-                setSecurityInfo.invoke(callbackHandler, principal, evidence);
-                return callbackHandler;
-            } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
-                // ignore if this method does not exist
-                return handler;
-            }
-        } else if (Security.getProperty("auth.login.defaultCallbackHandler") != null) {
-            // security property "auth.login.defaultCallbackHandler" is not null so LoginContext will initialize it itself
-            return null;
-        } else {
-            return new JaasSecurityRealmDefaultCallbackHandler(principal, evidence);
-        }
-    }
-
     private class JaasRealmIdentity implements RealmIdentity {
 
         private final Principal principal;
+        private URI jaasConfigFilePath;

@Kshitiz-Mhto Sorry I meant to say this class should use jaasConfigFilePath from its outer class, not parent

Kshitiz-Mhto Kshitiz-Mhto commented on code on Sep 07, 2022 16:35 UTC
Code Review
auth/realm/base/src/main/java/org/wildfly/security/auth/realm/JaasSecurityRealm.java:1
@@ -148,54 +148,10 @@ public SupportLevel getEvidenceVerifySupport(final Class<? extends Evidence> evi
         return SupportLevel.POSSIBLY_SUPPORTED;
     }
 
-    /**
-     * @param entry           login configuration file entry
-     * @param subject         classLoader to use with LoginContext, this class loader must contain LoginModule CallbackHandler classes
-     * @param callbackHandler callbackHandler to pass to LoginContext
-     * @return the instance of LoginContext
-     * @throws RealmUnavailableException
-     */
-    private LoginContext createLoginContext(final String entry, final Subject subject, final CallbackHandler callbackHandler) throws RealmUnavailableException {
-        if (jaasConfigFilePath != null) {
-            File file = new File(this.jaasConfigFilePath);
-            if (!file.exists() && !file.isDirectory()) {
-                throw ElytronMessages.log.failedToLoadJaasConfigFile();
-            }
-        }
-        try {
-            if (jaasConfigFilePath == null) {
-                return new LoginContext(entry, subject, callbackHandler);
-            } else {
-                return new LoginContext(entry, subject, callbackHandler, Configuration.getInstance(DEFAULT_CONFIGURATION_POLICY_TYPE, new URIParameter(jaasConfigFilePath)));
-            }
-        } catch (LoginException | NoSuchAlgorithmException le) {
-            throw ElytronMessages.log.failedToCreateLoginContext(le);
-        }
-    }
-
-    private CallbackHandler createCallbackHandler(final Principal principal, final Evidence evidence) {
-        if (handler != null) {
-            try {
-                final CallbackHandler callbackHandler = handler.getClass().getConstructor().newInstance();
-                // custom handlers were allowed in the past as long as they had a public setSecurityInfo method. Use this method if it exists
-                final Method setSecurityInfo = handler.getClass().getMethod("setSecurityInfo", Principal.class, Object.class);
-                setSecurityInfo.invoke(callbackHandler, principal, evidence);
-                return callbackHandler;
-            } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
-                // ignore if this method does not exist
-                return handler;
-            }
-        } else if (Security.getProperty("auth.login.defaultCallbackHandler") != null) {
-            // security property "auth.login.defaultCallbackHandler" is not null so LoginContext will initialize it itself
-            return null;
-        } else {
-            return new JaasSecurityRealmDefaultCallbackHandler(principal, evidence);
-        }
-    }
-
     private class JaasRealmIdentity implements RealmIdentity {
 
         private final Principal principal;
+        private URI jaasConfigFilePath;

Hi @Skyllarr, when i removed the line 154 as per your suggestion, it leads to a error in line

!line264

which says cannot resolve symbol

---
then when i refactor the line 264 from this.jaasConfigFilePath ---> jaasConfigFilePath , error gone

skyllarr skyllarr commented on code on Sep 07, 2022 16:39 UTC
Code Review
auth/realm/base/src/main/java/org/wildfly/security/auth/realm/JaasSecurityRealm.java:1
@@ -148,54 +148,10 @@ public SupportLevel getEvidenceVerifySupport(final Class<? extends Evidence> evi
         return SupportLevel.POSSIBLY_SUPPORTED;
     }
 
-    /**
-     * @param entry           login configuration file entry
-     * @param subject         classLoader to use with LoginContext, this class loader must contain LoginModule CallbackHandler classes
-     * @param callbackHandler callbackHandler to pass to LoginContext
-     * @return the instance of LoginContext
-     * @throws RealmUnavailableException
-     */
-    private LoginContext createLoginContext(final String entry, final Subject subject, final CallbackHandler callbackHandler) throws RealmUnavailableException {
-        if (jaasConfigFilePath != null) {
-            File file = new File(this.jaasConfigFilePath);
-            if (!file.exists() && !file.isDirectory()) {
-                throw ElytronMessages.log.failedToLoadJaasConfigFile();
-            }
-        }
-        try {
-            if (jaasConfigFilePath == null) {
-                return new LoginContext(entry, subject, callbackHandler);
-            } else {
-                return new LoginContext(entry, subject, callbackHandler, Configuration.getInstance(DEFAULT_CONFIGURATION_POLICY_TYPE, new URIParameter(jaasConfigFilePath)));
-            }
-        } catch (LoginException | NoSuchAlgorithmException le) {
-            throw ElytronMessages.log.failedToCreateLoginContext(le);
-        }
-    }
-
-    private CallbackHandler createCallbackHandler(final Principal principal, final Evidence evidence) {
-        if (handler != null) {
-            try {
-                final CallbackHandler callbackHandler = handler.getClass().getConstructor().newInstance();
-                // custom handlers were allowed in the past as long as they had a public setSecurityInfo method. Use this method if it exists
-                final Method setSecurityInfo = handler.getClass().getMethod("setSecurityInfo", Principal.class, Object.class);
-                setSecurityInfo.invoke(callbackHandler, principal, evidence);
-                return callbackHandler;
-            } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
-                // ignore if this method does not exist
-                return handler;
-            }
-        } else if (Security.getProperty("auth.login.defaultCallbackHandler") != null) {
-            // security property "auth.login.defaultCallbackHandler" is not null so LoginContext will initialize it itself
-            return null;
-        } else {
-            return new JaasSecurityRealmDefaultCallbackHandler(principal, evidence);
-        }
-    }
-
     private class JaasRealmIdentity implements RealmIdentity {
 
         private final Principal principal;
+        private URI jaasConfigFilePath;

@Kshitiz-Mhto Yes, changing this.jaasConfigFilePath to jaasConfigFilepath is a good fix!

Feel free to update your PR with this change. If you encounter any problems with git, just let us know.

Kshitiz-Mhto Kshitiz-Mhto commented on code on Sep 07, 2022 16:49 UTC
Code Review
auth/realm/base/src/main/java/org/wildfly/security/auth/realm/JaasSecurityRealm.java:1
@@ -148,54 +148,10 @@ public SupportLevel getEvidenceVerifySupport(final Class<? extends Evidence> evi
         return SupportLevel.POSSIBLY_SUPPORTED;
     }
 
-    /**
-     * @param entry           login configuration file entry
-     * @param subject         classLoader to use with LoginContext, this class loader must contain LoginModule CallbackHandler classes
-     * @param callbackHandler callbackHandler to pass to LoginContext
-     * @return the instance of LoginContext
-     * @throws RealmUnavailableException
-     */
-    private LoginContext createLoginContext(final String entry, final Subject subject, final CallbackHandler callbackHandler) throws RealmUnavailableException {
-        if (jaasConfigFilePath != null) {
-            File file = new File(this.jaasConfigFilePath);
-            if (!file.exists() && !file.isDirectory()) {
-                throw ElytronMessages.log.failedToLoadJaasConfigFile();
-            }
-        }
-        try {
-            if (jaasConfigFilePath == null) {
-                return new LoginContext(entry, subject, callbackHandler);
-            } else {
-                return new LoginContext(entry, subject, callbackHandler, Configuration.getInstance(DEFAULT_CONFIGURATION_POLICY_TYPE, new URIParameter(jaasConfigFilePath)));
-            }
-        } catch (LoginException | NoSuchAlgorithmException le) {
-            throw ElytronMessages.log.failedToCreateLoginContext(le);
-        }
-    }
-
-    private CallbackHandler createCallbackHandler(final Principal principal, final Evidence evidence) {
-        if (handler != null) {
-            try {
-                final CallbackHandler callbackHandler = handler.getClass().getConstructor().newInstance();
-                // custom handlers were allowed in the past as long as they had a public setSecurityInfo method. Use this method if it exists
-                final Method setSecurityInfo = handler.getClass().getMethod("setSecurityInfo", Principal.class, Object.class);
-                setSecurityInfo.invoke(callbackHandler, principal, evidence);
-                return callbackHandler;
-            } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
-                // ignore if this method does not exist
-                return handler;
-            }
-        } else if (Security.getProperty("auth.login.defaultCallbackHandler") != null) {
-            // security property "auth.login.defaultCallbackHandler" is not null so LoginContext will initialize it itself
-            return null;
-        } else {
-            return new JaasSecurityRealmDefaultCallbackHandler(principal, evidence);
-        }
-    }
-
     private class JaasRealmIdentity implements RealmIdentity {
 
         private final Principal principal;
+        private URI jaasConfigFilePath;

@Skyaller thank you for your warm welcome and for the opporunity. Another thing, i m having some issue with building this project in my intellij, should i post those error screenshot on zulip?

skyllarr skyllarr commented on code on Sep 07, 2022 19:28 UTC
Code Review
auth/realm/base/src/main/java/org/wildfly/security/auth/realm/JaasSecurityRealm.java:1
@@ -148,54 +148,10 @@ public SupportLevel getEvidenceVerifySupport(final Class<? extends Evidence> evi
         return SupportLevel.POSSIBLY_SUPPORTED;
     }
 
-    /**
-     * @param entry           login configuration file entry
-     * @param subject         classLoader to use with LoginContext, this class loader must contain LoginModule CallbackHandler classes
-     * @param callbackHandler callbackHandler to pass to LoginContext
-     * @return the instance of LoginContext
-     * @throws RealmUnavailableException
-     */
-    private LoginContext createLoginContext(final String entry, final Subject subject, final CallbackHandler callbackHandler) throws RealmUnavailableException {
-        if (jaasConfigFilePath != null) {
-            File file = new File(this.jaasConfigFilePath);
-            if (!file.exists() && !file.isDirectory()) {
-                throw ElytronMessages.log.failedToLoadJaasConfigFile();
-            }
-        }
-        try {
-            if (jaasConfigFilePath == null) {
-                return new LoginContext(entry, subject, callbackHandler);
-            } else {
-                return new LoginContext(entry, subject, callbackHandler, Configuration.getInstance(DEFAULT_CONFIGURATION_POLICY_TYPE, new URIParameter(jaasConfigFilePath)));
-            }
-        } catch (LoginException | NoSuchAlgorithmException le) {
-            throw ElytronMessages.log.failedToCreateLoginContext(le);
-        }
-    }
-
-    private CallbackHandler createCallbackHandler(final Principal principal, final Evidence evidence) {
-        if (handler != null) {
-            try {
-                final CallbackHandler callbackHandler = handler.getClass().getConstructor().newInstance();
-                // custom handlers were allowed in the past as long as they had a public setSecurityInfo method. Use this method if it exists
-                final Method setSecurityInfo = handler.getClass().getMethod("setSecurityInfo", Principal.class, Object.class);
-                setSecurityInfo.invoke(callbackHandler, principal, evidence);
-                return callbackHandler;
-            } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
-                // ignore if this method does not exist
-                return handler;
-            }
-        } else if (Security.getProperty("auth.login.defaultCallbackHandler") != null) {
-            // security property "auth.login.defaultCallbackHandler" is not null so LoginContext will initialize it itself
-            return null;
-        } else {
-            return new JaasSecurityRealmDefaultCallbackHandler(principal, evidence);
-        }
-    }
-
     private class JaasRealmIdentity implements RealmIdentity {
 
         private final Principal principal;
+        private URI jaasConfigFilePath;

@Kshitiz-Mhto Sure! Yes you can post those here or on Zulip, @fjuma or @cam-rod might be able to help you.

Just some general tips for building, you should use Java 11 and have JAVA_HOME variable configured.

jessicarod7 jessicarod7 commented on code on Sep 07, 2022 19:50 UTC
Code Review
auth/realm/base/src/main/java/org/wildfly/security/auth/realm/JaasSecurityRealm.java:1
@@ -148,54 +148,10 @@ public SupportLevel getEvidenceVerifySupport(final Class<? extends Evidence> evi
         return SupportLevel.POSSIBLY_SUPPORTED;
     }
 
-    /**
-     * @param entry           login configuration file entry
-     * @param subject         classLoader to use with LoginContext, this class loader must contain LoginModule CallbackHandler classes
-     * @param callbackHandler callbackHandler to pass to LoginContext
-     * @return the instance of LoginContext
-     * @throws RealmUnavailableException
-     */
-    private LoginContext createLoginContext(final String entry, final Subject subject, final CallbackHandler callbackHandler) throws RealmUnavailableException {
-        if (jaasConfigFilePath != null) {
-            File file = new File(this.jaasConfigFilePath);
-            if (!file.exists() && !file.isDirectory()) {
-                throw ElytronMessages.log.failedToLoadJaasConfigFile();
-            }
-        }
-        try {
-            if (jaasConfigFilePath == null) {
-                return new LoginContext(entry, subject, callbackHandler);
-            } else {
-                return new LoginContext(entry, subject, callbackHandler, Configuration.getInstance(DEFAULT_CONFIGURATION_POLICY_TYPE, new URIParameter(jaasConfigFilePath)));
-            }
-        } catch (LoginException | NoSuchAlgorithmException le) {
-            throw ElytronMessages.log.failedToCreateLoginContext(le);
-        }
-    }
-
-    private CallbackHandler createCallbackHandler(final Principal principal, final Evidence evidence) {
-        if (handler != null) {
-            try {
-                final CallbackHandler callbackHandler = handler.getClass().getConstructor().newInstance();
-                // custom handlers were allowed in the past as long as they had a public setSecurityInfo method. Use this method if it exists
-                final Method setSecurityInfo = handler.getClass().getMethod("setSecurityInfo", Principal.class, Object.class);
-                setSecurityInfo.invoke(callbackHandler, principal, evidence);
-                return callbackHandler;
-            } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
-                // ignore if this method does not exist
-                return handler;
-            }
-        } else if (Security.getProperty("auth.login.defaultCallbackHandler") != null) {
-            // security property "auth.login.defaultCallbackHandler" is not null so LoginContext will initialize it itself
-            return null;
-        } else {
-            return new JaasSecurityRealmDefaultCallbackHandler(principal, evidence);
-        }
-    }
-
     private class JaasRealmIdentity implements RealmIdentity {
 
         private final Principal principal;
+        private URI jaasConfigFilePath;

Hey @Kshitiz-Mhto, we've just added some configuration guides for Elytron, take a look and let me know if you have any issues.

Kshitiz-Mhto Kshitiz-Mhto commented on code on Sep 08, 2022 03:04 UTC
Code Review
auth/realm/base/src/main/java/org/wildfly/security/auth/realm/JaasSecurityRealm.java:1
@@ -148,54 +148,10 @@ public SupportLevel getEvidenceVerifySupport(final Class<? extends Evidence> evi
         return SupportLevel.POSSIBLY_SUPPORTED;
     }
 
-    /**
-     * @param entry           login configuration file entry
-     * @param subject         classLoader to use with LoginContext, this class loader must contain LoginModule CallbackHandler classes
-     * @param callbackHandler callbackHandler to pass to LoginContext
-     * @return the instance of LoginContext
-     * @throws RealmUnavailableException
-     */
-    private LoginContext createLoginContext(final String entry, final Subject subject, final CallbackHandler callbackHandler) throws RealmUnavailableException {
-        if (jaasConfigFilePath != null) {
-            File file = new File(this.jaasConfigFilePath);
-            if (!file.exists() && !file.isDirectory()) {
-                throw ElytronMessages.log.failedToLoadJaasConfigFile();
-            }
-        }
-        try {
-            if (jaasConfigFilePath == null) {
-                return new LoginContext(entry, subject, callbackHandler);
-            } else {
-                return new LoginContext(entry, subject, callbackHandler, Configuration.getInstance(DEFAULT_CONFIGURATION_POLICY_TYPE, new URIParameter(jaasConfigFilePath)));
-            }
-        } catch (LoginException | NoSuchAlgorithmException le) {
-            throw ElytronMessages.log.failedToCreateLoginContext(le);
-        }
-    }
-
-    private CallbackHandler createCallbackHandler(final Principal principal, final Evidence evidence) {
-        if (handler != null) {
-            try {
-                final CallbackHandler callbackHandler = handler.getClass().getConstructor().newInstance();
-                // custom handlers were allowed in the past as long as they had a public setSecurityInfo method. Use this method if it exists
-                final Method setSecurityInfo = handler.getClass().getMethod("setSecurityInfo", Principal.class, Object.class);
-                setSecurityInfo.invoke(callbackHandler, principal, evidence);
-                return callbackHandler;
-            } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
-                // ignore if this method does not exist
-                return handler;
-            }
-        } else if (Security.getProperty("auth.login.defaultCallbackHandler") != null) {
-            // security property "auth.login.defaultCallbackHandler" is not null so LoginContext will initialize it itself
-            return null;
-        } else {
-            return new JaasSecurityRealmDefaultCallbackHandler(principal, evidence);
-        }
-    }
-
     private class JaasRealmIdentity implements RealmIdentity {
 
         private final Principal principal;
+        private URI jaasConfigFilePath;

Successfully executed sudo mvn clean install thank you :+1:

skyllarr skyllarr commented on Sep 26, 2022 18:35 UTC
Contributor

Hello @Kshitiz-Mhto , currently there are 2 commits in this PR. Can you please squash the commits into a single commit with the ELY issue number at the beggining? Thank you!

skyllarr skyllarr commented on Sep 26, 2022 18:36 UTC
Contributor

@Kshitiz-Mhto We have a video that shows how to squash commits here: https://www.youtube.com/watch?v=NUfyS-2vTfo . If you need any help let us know. Thanks!

Kshitiz-Mhto Kshitiz-Mhto commented on Sep 27, 2022 07:14 UTC
Author

Hello @Kshitiz-Mhto , currently there are 2 commits in this PR. Can you please squash the commits into a single commit with the ELY issue number at the beggining? Thank you!

hello! @Skyllarr Done! thankyou

skyllarr skyllarr commented on Sep 29, 2022 11:20 UTC
Contributor

@Kshitiz-Mhto Looks great, thank you!

skyllarr skyllarr approved these changes on Sep 29, 2022 11:21 UTC
Approved Reviewer

Approved these changes.

fjuma fjuma approved these changes on Oct 07, 2022 20:37 UTC
Approved Reviewer

Sorry for the delay in getting this merged, was away for a bit. Thanks @Kshitiz-Mhto!

Reviewers
Assignees
Kshitiz-Mhto Kshitiz-Mhto
Labels
risk: low confidence: 90.0% reviewed sensitive_module
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 53.2% (MEDIUM) · Higher = larger blast radius
53.2%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 90.0% · Lower = rushed or shallow review
90.0%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 5.3% · Safe to merge
5.3%