-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
merge uat in main #193
Merged
Merged
merge uat in main #193
Changes from all commits
Commits
Show all changes
85 commits
Select commit
Hold shift + click to select a range
9807556
Dev (#165)
SMANUM 0429705
mergin dev into uat (#168)
LuciaM1 305bc23
feat: 042970510bab5190374bac3c3be11d3ecac9cb1c
actions-user 73be9f0
pom.xml updated with new version 1.17.0
actions-user 9e392a2
Chart.yaml updated with new version v1.17.0
actions-user 634b6a1
feat: docker-image: v1.17.0, chart: v1.17.0
actions-user d9b2bf4
Merge remote-tracking branch 'origin/main' into uat
LuciaM1 ba18749
Dev (#170)
GiacomoBrancazi 1d184c8
feat: ba18749c68f993452c12b1d1fca1fa90d477c831
actions-user f03e112
pom.xml updated with new version 1.18.0
actions-user 5a313ab
Chart.yaml updated with new version v1.18.0
actions-user 08a051d
feat: docker-image: v1.18.0, chart: v1.18.0
actions-user fa4e97d
merging dev into uat (#171)
LuciaM1 d3016d2
feat: fa4e97d5f76c2b6b1674b571beee9d339d7e07d4
actions-user 95c7baf
pom.xml updated with new version 1.19.0
actions-user 8394b14
Chart.yaml updated with new version v1.19.0
actions-user 2492f8f
feat: docker-image: v1.19.0, chart: v1.19.0
actions-user 7540193
test 2 repliche
adrrss 016c2e2
test 2 repliche
adrrss ed3c50e
test 1 repliche
adrrss c4ddcc8
test 3 repliche
adrrss f882b44
test 3 repliche
adrrss 6bc79c3
test 3 repliche
adrrss d3d33ce
test 3 repliche
adrrss 16be66d
disable autoscaling
adrrss 59fc9f1
ripristino autoscaling
adrrss fe5eec4
merging dev into uat (#176)
LuciaM1 44c98ac
feat: fe5eec4af8bacbd26dbc7e6ffed29a84a76c4514
actions-user dc19bb5
pom.xml updated with new version 1.20.0
actions-user 0e3d0ab
Chart.yaml updated with new version v1.20.0
actions-user 896a1a3
feat: docker-image: v1.20.0, chart: v1.20.0
actions-user 3225f42
merging dev into uat (#178)
LuciaM1 dcee3bd
feat: 3225f4274ebf7430c9d417e67c4abaced5874de8
actions-user 43f6180
pom.xml updated with new version 1.21.0
actions-user 8e81c31
Chart.yaml updated with new version v1.21.0
actions-user a1e61b9
feat: docker-image: v1.21.0, chart: v1.21.0
actions-user e3cc263
feat: 3225f4274ebf7430c9d417e67c4abaced5874de8
actions-user f170924
pom.xml updated with new version 1.22.0
actions-user 194a6ee
Chart.yaml updated with new version v1.22.0
actions-user e1986c1
feat: docker-image: v1.22.0, chart: v1.22.0
actions-user a13b82c
feat: 3225f4274ebf7430c9d417e67c4abaced5874de8
actions-user 77efc82
pom.xml updated with new version 1.23.0
actions-user ce9dca7
Chart.yaml updated with new version v1.23.0
actions-user a9b1e9f
feat: docker-image: v1.23.0, chart: v1.23.0
actions-user bcfdb3c
Dev (#179)
EmanueleValentini1 2101ff1
feat: bcfdb3c37039aa4ea0ab6c68b92beab2489b1246
actions-user 18f5dbc
pom.xml updated with new version 1.24.0
actions-user bdf02b4
Chart.yaml updated with new version v1.24.0
actions-user a0a20e8
feat: docker-image: v1.24.0, chart: v1.24.0
actions-user ab19dac
Merge remote-tracking branch 'origin/main' into uat
EmanueleValentini1 6a6d325
merging dev into uat (#181)
LuciaM1 5388896
feat: 6a6d325041b31ecadeab47659b8107ae63879933
actions-user a38e29a
pom.xml updated with new version 1.25.0
actions-user 5652dbb
Chart.yaml updated with new version v1.25.0
actions-user 1273db7
feat: docker-image: v1.25.0, chart: v1.25.0
actions-user a610183
Merge remote-tracking branch 'origin/main' into uat
LuciaM1 3ae136d
merging dev into uat (#184)
LuciaM1 7b25f52
feat: 3ae136dd494d73bf2284e6bfce80cc3cd4ef1dde
actions-user d7d2ae4
pom.xml updated with new version 1.26.0
actions-user 0793b3b
Chart.yaml updated with new version v1.26.0
actions-user b6fe4a6
feat: docker-image: v1.26.0, chart: v1.26.0
actions-user ae74425
merging dev into uat (#186)
LuciaM1 aeb13ae
feat: ae744253d23d5a56836b7a417a82c4a3c0f289c6
actions-user a9c362b
pom.xml updated with new version 1.27.0
actions-user e7409eb
Chart.yaml updated with new version v1.27.0
actions-user 854f6cc
feat: docker-image: v1.27.0, chart: v1.27.0
actions-user e86a950
Merge remote-tracking branch 'origin/main' into uat
LuciaM1 488d079
Dev (#188)
EmanueleValentini1 9b0e0fa
feat: 488d079b82f4b3625884c5f93a8d2d363725b6cf
actions-user e977add
pom.xml updated with new version 1.28.0
actions-user 26cece8
Chart.yaml updated with new version v1.28.0
actions-user 5ce2867
feat: docker-image: v1.28.0, chart: v1.28.0
actions-user bfb076e
Merge remote-tracking branch 'origin/main' into uat
EmanueleValentini1 060f371
Dev (#190)
EmanueleValentini1 a128086
feat: 060f37154fb23219f4d47c81a559110e99f160e2
actions-user 9651aef
pom.xml updated with new version 1.29.0
actions-user c8faf2b
Chart.yaml updated with new version v1.29.0
actions-user 5f9263f
feat: docker-image: v1.29.0, chart: v1.29.0
actions-user 0d2e34c
Merge remote-tracking branch 'origin/main' into uat
EmanueleValentini1 a466066
merge dev in uat (#192)
ElisKina-dev 100bdee
feat: a46606672a5ac114ab6b22ad084c8812fec058b7
actions-user ada274c
pom.xml updated with new version 1.30.0
actions-user 444f037
Chart.yaml updated with new version v1.30.0
actions-user d656f30
feat: docker-image: v1.30.0, chart: v1.30.0
actions-user a964baa
Merge remote-tracking branch 'origin/main' into uat
ElisKina-dev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
50 changes: 50 additions & 0 deletions
50
src/main/java/it/gov/pagopa/atmlayer/service/model/configurations/DirManager.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,50 @@ | ||
package it.gov.pagopa.atmlayer.service.model.configurations; | ||
|
||
import io.quarkus.runtime.Shutdown; | ||
import io.quarkus.runtime.ShutdownEvent; | ||
import io.quarkus.runtime.Startup; | ||
import io.quarkus.runtime.StartupEvent; | ||
import jakarta.enterprise.context.ApplicationScoped; | ||
import jakarta.enterprise.event.Observes; | ||
import lombok.Getter; | ||
import org.apache.commons.io.FileUtils; | ||
import org.apache.commons.lang3.SystemUtils; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import java.nio.file.attribute.PosixFilePermission; | ||
import java.util.EnumSet; | ||
import java.util.Set; | ||
|
||
@ApplicationScoped | ||
public class DirManager { | ||
|
||
@Getter | ||
public static File decodedFilesDirectory; | ||
|
||
@Startup | ||
static void init(@Observes StartupEvent ev) throws IOException { | ||
String secureDirPath = System.getProperty("java.io.tmpdir") + "/decodedFilesDirectory"; | ||
decodedFilesDirectory = new File(secureDirPath); | ||
if (!decodedFilesDirectory.exists() && !decodedFilesDirectory.mkdirs()) { | ||
throw new IOException("Impossibile creare una directory sicura per il salvataggio di file temporanei."); | ||
} | ||
if (SystemUtils.IS_OS_UNIX) { | ||
Set<PosixFilePermission> dirPermissions = EnumSet.of( | ||
PosixFilePermission.OWNER_READ, | ||
PosixFilePermission.OWNER_WRITE, | ||
PosixFilePermission.OWNER_EXECUTE | ||
); | ||
java.nio.file.Files.setPosixFilePermissions(decodedFilesDirectory.toPath(), dirPermissions); | ||
} | ||
} | ||
|
||
@Shutdown | ||
static void shutdown(@Observes ShutdownEvent ev) throws IOException { | ||
FileUtils.deleteDirectory(decodedFilesDirectory); | ||
} | ||
|
||
private DirManager() { | ||
throw new IllegalStateException("Utility class DirManager should not be instantiated"); | ||
} | ||
} |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / CodeQL
Local information disclosure in a temporary directory Medium
Copilot Autofix AI about 2 months ago
To fix the problem, we should use the
java.nio.file.Files.createTempDirectory
method, which allows us to create a temporary directory with secure permissions from the start. This method ensures that the directory is created with permissions that restrict access to the owner only, thus preventing local information disclosure.Steps to fix:
new File
andmkdirs()
withFiles.createTempDirectory
.decodedFilesDirectory
to use the path returned byFiles.createTempDirectory
.