Skip to content

Commit

Permalink
minimize changes
Browse files Browse the repository at this point in the history
  • Loading branch information
artoonie committed Feb 1, 2024
1 parent c15bf17 commit 84df706
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ jobs:
echo "FILENAME=${{ steps.basefn.outputs.FILENAME }}.cache.zip" >> $GITHUB_OUTPUT
- name: "Generate SHA1 and SHA256 for each maven dependency"
shell: bash
run: ./.github/workflows/generate-dependency-hashes.sh ${{ runner.os }} >> ~/.gradle/caches/checksums.csv
run: ./.github/workflows/generate-dependency-hashes.sh ${{ runner.os }} >> ~/.gradle/caches/modules-2/checksums.csv

- name: "Create dependency zip"
uses: ./.github/actions/zip
with:
# Build, then remove all non-essential files
command: ./gradlew build -xtest && ./gradlew --stop && ls ~/.gradle/caches/* && for i in $(find ~/.gradle/caches -name gc.properties); do rm $i; done
input: "~/.gradle/caches"
command: ./gradlew build -xtest && ./gradlew --stop && for i in $(find ~/.gradle/caches -name gc.properties); do rm $i; done
input: "~/.gradle/caches/modules-2"
zipFilename: ${{steps.cachefn.outputs.FILENAME}}

- name: "Generate SHA512 for plugins cache"
Expand Down
5 changes: 2 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id "application"
id "checkstyle"
// Latest version at: https://github.com/spotbugs/spotbugs-gradle-plugin/tags
id "com.github.spotbugs" version "6.0.3"
id "com.github.spotbugs" version "5.0.9"
id "idea"
id "java-library"
id "org.beryx.jlink" version "2.25.0"
Expand All @@ -23,7 +23,6 @@ dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
implementation 'org.bouncycastle:bc-fips:1.0.2.3'
implementation "com.github.spotbugs:spotbugs:4.8.3"
}

// ### Application plugin settings
Expand Down Expand Up @@ -60,7 +59,7 @@ System.setProperty("org.checkstyle.google.suppressionfilter.config",

spotbugs {
// Latest version at: https://github.com/spotbugs/spotbugs/tags
toolVersion = '4.8.3'
toolVersion = '4.7.1'
excludeFilter = file("config/spotbugs/exclude.xml")
}

Expand Down
8 changes: 0 additions & 8 deletions config/spotbugs/exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,4 @@
<Field name="xmlns"/>
<Bug code="UrF"/>
</Match>
<Match>
<Class name="network.brightspots.rcv.StreamingCvrReader"/>
<Bug code="CT"/>
</Match>
<Match>
<Class name="network.brightspots.rcv.Tabulator"/>
<Bug code="CT"/>
</Match>
</FindBugsFilter>
6 changes: 4 additions & 2 deletions src/main/java/network/brightspots/rcv/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ private static void setupAndVerifyFipsCompliance() throws SecurityConfigurationE
try {
String randomProviderName =
java.security.SecureRandom.getInstanceStrong().getProvider().getName();
if (!randomProviderName.equals(expectedSecureRandomProvider)) {
Logger.warning("The SecureRandom provider is " + randomProviderName);
if (!randomProviderName.equals(expectedSecureRandomProvider)
&& !randomProviderName.equals(new BouncyCastleFipsProvider().getName())) {
throw new SecurityConfigurationException("Unexpected SecureRandom provider"
+ randomProviderName);
}
} catch (NoSuchAlgorithmException e) {
throw new SecurityConfigurationException("No SecureRandom algorithm found.");
Expand Down

0 comments on commit 84df706

Please sign in to comment.