github-code-scanning[bot] commented on code in PR #372:
URL: https://github.com/apache/syncope/pull/372#discussion_r960487846
##########
core/spring/src/main/java/org/apache/syncope/core/spring/security/DefaultPasswordGenerator.java:
##########
@@ -60,21 +66,31 @@
return generate(policies);
}
- @Override
- public String generate(final List<PasswordPolicy> policies) {
- List<DefaultPasswordRuleConf> ruleConfs = new ArrayList<>();
+ protected List<PasswordRule> getPasswordRules(final PasswordPolicy policy)
{
+ List<PasswordRule> result = new ArrayList<>();
- policies.stream().forEach(policy -> policy.getRules().forEach(impl -> {
+ for (Implementation impl : policy.getRules()) {
try {
- ImplementationManager.buildPasswordRule(impl).ifPresent(rule
-> {
- if (rule.getConf() instanceof DefaultPasswordRuleConf) {
- ruleConfs.add((DefaultPasswordRuleConf)
rule.getConf());
- }
- });
+ ImplementationManager.buildPasswordRule(
+ impl,
+ () -> perContextPasswordRules.get(impl.getKey()),
+ instance -> perContextPasswordRules.put(impl.getKey(),
instance)).
+ ifPresent(result::add);
} catch (Exception e) {
- LOG.error("Invalid {}, ignoring...", impl, e);
+ LOG.warn("While building {}", impl, e);
Review Comment:
## Insertion of sensitive information into log files
This [potentially sensitive information](1) is written to a log file.
This [potentially sensitive information](2) is written to a log file.
[Show more
details](https://github.com/apache/syncope/security/code-scanning/1148)
##########
core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PushJobDelegate.java:
##########
@@ -151,6 +155,41 @@
createBean(DefaultGroupPushResultHandler.class,
AbstractBeanDefinition.AUTOWIRE_BY_NAME, false);
}
+ protected List<PushActions> getPushActions(final List<? extends
Implementation> impls) {
+ List<PushActions> result = new ArrayList<>();
+
+ impls.forEach(impl -> {
+ try {
+ result.add(ImplementationManager.build(
+ impl,
+ () -> perContextActions.get(impl.getKey()),
+ instance -> perContextActions.put(impl.getKey(),
instance)));
+ } catch (Exception e) {
+ LOG.warn("While building {}", impl, e);
+ }
+ });
+
+ return result;
+ }
+
+ protected ProvisionSorter getProvisionSorter(final PushTask pushTask) {
Review Comment:
## Missing Override annotation
This method overrides
[AbstractProvisioningJobDelegate<PushTask>.getProvisionSorter](1); it is
advisable to add an Override annotation.
[Show more
details](https://github.com/apache/syncope/security/code-scanning/1146)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]