Jinal-Sarvaiya commented on code in PR #149:
URL: https://github.com/apache/camel-kit/pull/149#discussion_r4478333303
##########
kit/camel-kit-core/src/main/java/org/apache/camel/kit/ship/controller/ShipNativeWorker.java:
##########
@@ -285,15 +285,21 @@ static void applyProposals(
allowed.add(route.routePath());
allowed.add(route.citrusTestPath());
}
- // Validate every proposal before touching the candidate.
+ // Validate and filter proposals: drop files outside the approved
policy,
+ // reject any file that leaks a known secret.
+ List<ProposedFile> accepted = new ArrayList<>();
for (ProposedFile file : files) {
- if (!allowed.contains(file.path()) ||
ChangedWorkspaceSecretScanner.containsSensitiveValue(
+ if (!allowed.contains(file.path())) {
+ continue;
Review Comment:
Restored `throw invalid(...)` for the entire batch when any file is outside
the approved artifact policy. Silent filtering with `continue` would let a
partial proposal slip through, breaking the atomic rejection contract that
`ShipNativeWorkerTest.controllerWritesOnlyApprovedFilesAndConstructsHashes`
enforces.
--
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]