-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introducing a new lifecycle method `beforeRemoteDownload` which applies when a package is being fetched from external repositories instead of on every download. Adding a new configuration property `snyk.scanner.test.continuously` which allowes users to switch between applying the plugin on every download (continuous mode) or just once during fetch from remote (non-continuous mode).
- Loading branch information
1 parent
1e2896c
commit 1fcd455
Showing
13 changed files
with
196 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
core/src/main/java/io/snyk/plugins/artifactory/scanner/ArtifactResolver.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package io.snyk.plugins.artifactory.scanner; | ||
|
||
import io.snyk.plugins.artifactory.configuration.properties.ArtifactProperties; | ||
import io.snyk.plugins.artifactory.model.MonitoredArtifact; | ||
|
||
import java.util.Optional; | ||
import java.util.function.Supplier; | ||
|
||
public interface ArtifactResolver { | ||
|
||
Optional<MonitoredArtifact> get(ArtifactProperties properties, Supplier<Optional<MonitoredArtifact>> fetch); | ||
} |
15 changes: 15 additions & 0 deletions
15
core/src/main/java/io/snyk/plugins/artifactory/scanner/ReadOnlyArtifactResolver.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package io.snyk.plugins.artifactory.scanner; | ||
|
||
import io.snyk.plugins.artifactory.configuration.properties.ArtifactProperties; | ||
import io.snyk.plugins.artifactory.model.MonitoredArtifact; | ||
|
||
import java.util.Optional; | ||
import java.util.function.Supplier; | ||
|
||
public class ReadOnlyArtifactResolver implements ArtifactResolver { | ||
|
||
@Override | ||
public Optional<MonitoredArtifact> get(ArtifactProperties properties, Supplier<Optional<MonitoredArtifact>> fetch) { | ||
return MonitoredArtifact.read(properties); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.