You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@baremaps.apache.org by "bchapuis (via GitHub)" <gi...@apache.org> on 2023/11/13 13:58:01 UTC
[PR] Workflow [incubator-baremaps]
bchapuis opened a new pull request, #802:
URL: https://github.com/apache/incubator-baremaps/pull/802
(no comment)
--
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: commits-unsubscribe@baremaps.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve workflow package [incubator-baremaps]
Posted by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org>.
github-advanced-security[bot] commented on code in PR #802:
URL: https://github.com/apache/incubator-baremaps/pull/802#discussion_r1391283419
##########
baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/DecompressFile.java:
##########
@@ -94,13 +203,20 @@
}
}
- public static void decompressTarBz2(Path sourcePath, Path targetPath) throws IOException {
- try (var bufferedInputStream = new BufferedInputStream(Files.newInputStream(sourcePath));
+ /**
+ * Decompresses a tar.bz2 file.
+ *
+ * @param source the source file
+ * @param target the target file
+ * @throws IOException if an I/O error occurs
+ */
+ protected static void decompressTarBz2(Path source, Path target) throws IOException {
+ try (var bufferedInputStream = new BufferedInputStream(Files.newInputStream(source));
var bzip2InputStream = new BZip2CompressorInputStream(bufferedInputStream);
var tarInputStream = new TarArchiveInputStream(bzip2InputStream)) {
TarArchiveEntry entry;
while ((entry = (TarArchiveEntry) tarInputStream.getNextEntry()) != null) {
- var path = targetPath.resolve(entry.getName());
+ var path = target.resolve(entry.getName());
Review Comment:
## Arbitrary file access during archive extraction ("Zip Slip")
Unsanitized archive entry, which may contain '..', is used in a [file system operation](1).
Unsanitized archive entry, which may contain '..', is used in a [file system operation](2).
Unsanitized archive entry, which may contain '..', is used in a [file system operation](3).
[Show more details](https://github.com/apache/incubator-baremaps/security/code-scanning/837)
##########
baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/DecompressFile.java:
##########
@@ -57,26 +145,47 @@
}
}
- public static void decompressBzip2(Path sourcePath, Path targetPath) throws IOException {
- try (var bufferedInputStream = new BufferedInputStream(Files.newInputStream(sourcePath));
+ /**
+ * Decompresses a bzip2 file.
+ *
+ * @param source the source file
+ * @param target the target file
+ * @throws IOException if an I/O error occurs
+ */
+ protected static void decompressBzip2(Path source, Path target) throws IOException {
+ try (var bufferedInputStream = new BufferedInputStream(Files.newInputStream(source));
var bzip2InputStream = new BZip2CompressorInputStream(bufferedInputStream)) {
- Files.copy(bzip2InputStream, targetPath, StandardCopyOption.REPLACE_EXISTING);
+ Files.copy(bzip2InputStream, target, StandardCopyOption.REPLACE_EXISTING);
}
}
- public static void decompressGzip(Path sourcePath, Path targetPath) throws IOException {
- try (var zis = new GZIPInputStream(new BufferedInputStream(Files.newInputStream(sourcePath)))) {
- Files.copy(zis, targetPath, StandardCopyOption.REPLACE_EXISTING);
+ /**
+ * Decompresses a gzip file.
+ *
+ * @param source the source file
+ * @param target the target file
+ * @throws IOException if an I/O error occurs
+ */
+ protected static void decompressGzip(Path source, Path target) throws IOException {
+ try (var zis = new GZIPInputStream(new BufferedInputStream(Files.newInputStream(source)))) {
+ Files.copy(zis, target, StandardCopyOption.REPLACE_EXISTING);
}
}
- public static void decompressTarGz(Path sourcePath, Path targetPath) throws IOException {
- try (var bufferedInputStream = new BufferedInputStream(Files.newInputStream(sourcePath));
+ /**
+ * Decompresses a tar.gz file.
+ *
+ * @param source the source file
+ * @param target the target file
+ * @throws IOException if an I/O error occurs
+ */
+ protected static void decompressTarGz(Path source, Path target) throws IOException {
+ try (var bufferedInputStream = new BufferedInputStream(Files.newInputStream(source));
var gzipInputStream = new GZIPInputStream(bufferedInputStream);
var tarInputStream = new TarArchiveInputStream(gzipInputStream)) {
TarArchiveEntry entry;
while ((entry = (TarArchiveEntry) tarInputStream.getNextEntry()) != null) {
- var path = targetPath.resolve(entry.getName());
+ var path = target.resolve(entry.getName());
Review Comment:
## Arbitrary file access during archive extraction ("Zip Slip")
Unsanitized archive entry, which may contain '..', is used in a [file system operation](1).
Unsanitized archive entry, which may contain '..', is used in a [file system operation](2).
Unsanitized archive entry, which may contain '..', is used in a [file system operation](3).
[Show more details](https://github.com/apache/incubator-baremaps/security/code-scanning/836)
##########
baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/DecompressFile.java:
##########
@@ -118,12 +234,19 @@
}
}
- public static void decompressZip(Path sourcePath, Path targetPath) throws IOException {
- try (var zipFile = new ZipFile(sourcePath.toFile())) {
+ /**
+ * Decompresses a zip file.
+ *
+ * @param source the source file
+ * @param target the target file
+ * @throws IOException if an I/O error occurs
+ */
+ protected static void decompressZip(Path source, Path target) throws IOException {
+ try (var zipFile = new ZipFile(source.toFile())) {
var entries = zipFile.entries();
while (entries.hasMoreElements()) {
var entry = entries.nextElement();
- var path = targetPath.resolve(entry.getName());
+ var path = target.resolve(entry.getName());
Review Comment:
## Arbitrary file access during archive extraction ("Zip Slip")
Unsanitized archive entry, which may contain '..', is used in a [file system operation](1).
Unsanitized archive entry, which may contain '..', is used in a [file system operation](2).
Unsanitized archive entry, which may contain '..', is used in a [file system operation](3).
[Show more details](https://github.com/apache/incubator-baremaps/security/code-scanning/838)
##########
baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/DecompressFile.java:
##########
@@ -57,26 +145,47 @@
}
}
- public static void decompressBzip2(Path sourcePath, Path targetPath) throws IOException {
- try (var bufferedInputStream = new BufferedInputStream(Files.newInputStream(sourcePath));
+ /**
+ * Decompresses a bzip2 file.
+ *
+ * @param source the source file
+ * @param target the target file
+ * @throws IOException if an I/O error occurs
+ */
+ protected static void decompressBzip2(Path source, Path target) throws IOException {
+ try (var bufferedInputStream = new BufferedInputStream(Files.newInputStream(source));
var bzip2InputStream = new BZip2CompressorInputStream(bufferedInputStream)) {
- Files.copy(bzip2InputStream, targetPath, StandardCopyOption.REPLACE_EXISTING);
+ Files.copy(bzip2InputStream, target, StandardCopyOption.REPLACE_EXISTING);
}
}
- public static void decompressGzip(Path sourcePath, Path targetPath) throws IOException {
- try (var zis = new GZIPInputStream(new BufferedInputStream(Files.newInputStream(sourcePath)))) {
- Files.copy(zis, targetPath, StandardCopyOption.REPLACE_EXISTING);
+ /**
+ * Decompresses a gzip file.
+ *
+ * @param source the source file
+ * @param target the target file
+ * @throws IOException if an I/O error occurs
+ */
+ protected static void decompressGzip(Path source, Path target) throws IOException {
+ try (var zis = new GZIPInputStream(new BufferedInputStream(Files.newInputStream(source)))) {
Review Comment:
## Potential input resource leak
This BufferedInputStream is not always closed on method exit.
[Show more details](https://github.com/apache/incubator-baremaps/security/code-scanning/839)
--
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: commits-unsubscribe@baremaps.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve workflow package [incubator-baremaps]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #802:
URL: https://github.com/apache/incubator-baremaps/pull/802#issuecomment-1815419933
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_baremaps&pullRequest=802)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL) [7 Code Smells](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802&metric=new_duplicated_lines_density&view=list) [22.0% Duplication](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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: commits-unsubscribe@baremaps.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve workflow package [incubator-baremaps]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #802:
URL: https://github.com/apache/incubator-baremaps/pull/802#issuecomment-1816681402
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_baremaps&pullRequest=802)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT) [1 Security Hotspot](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL) [5 Code Smells](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802&metric=new_duplicated_lines_density&view=list) [2.3% Duplication](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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: commits-unsubscribe@baremaps.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve workflow package [incubator-baremaps]
Posted by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org>.
github-advanced-security[bot] commented on code in PR #802:
URL: https://github.com/apache/incubator-baremaps/pull/802#discussion_r1424102676
##########
baremaps-core/src/main/java/org/apache/baremaps/workflow/WorkflowContext.java:
##########
@@ -41,4 +65,45 @@
return dataSources.computeIfAbsent(database, PostgresUtils::createDataSourceFromObject);
}
+ public DataMap<Long, Coordinate> getCoordinateMap(Path path) throws IOException {
+ if (Files.size(path) > 1 << 30) {
+ return getMemoryAlignedDataMap("coordinates", new LonLatDataType());
+ } else {
+ return getMonotonicDataMap("coordinates", new LonLatDataType());
+ }
+ }
+
+ public DataMap<Long, List<Long>> getReferenceMap(Path path) throws IOException {
Review Comment:
## Useless parameter
The parameter 'path' is never used.
[Show more details](https://github.com/apache/incubator-baremaps/security/code-scanning/852)
--
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: commits-unsubscribe@baremaps.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve workflow package [incubator-baremaps]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #802:
URL: https://github.com/apache/incubator-baremaps/pull/802#issuecomment-1818006465
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_baremaps&pullRequest=802)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT) [1 Security Hotspot](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802&metric=new_duplicated_lines_density&view=list) [1.5% Duplication](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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: commits-unsubscribe@baremaps.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve workflow package [incubator-baremaps]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #802:
URL: https://github.com/apache/incubator-baremaps/pull/802#issuecomment-1816392697
Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/dashboard?id=apache_baremaps&pullRequest=802)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL) [7 Code Smells](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802&metric=new_duplicated_lines_density&view=list) [2.6% Duplication](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802&metric=new_duplicated_lines_density&view=list)
--
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: commits-unsubscribe@baremaps.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve workflow package [incubator-baremaps]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #802:
URL: https://github.com/apache/incubator-baremaps/pull/802#issuecomment-1817701106
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_baremaps&pullRequest=802)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT) [1 Security Hotspot](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802&metric=new_duplicated_lines_density&view=list) [1.5% Duplication](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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: commits-unsubscribe@baremaps.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve workflow package [incubator-baremaps]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #802:
URL: https://github.com/apache/incubator-baremaps/pull/802#issuecomment-1852207423
## [](https://sonarcloud.io/dashboard?id=apache_baremaps&pullRequest=802) **Quality Gate failed**
Failed conditions
[1 Security Hotspot](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&inNewCodePeriod=true)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_baremaps&pullRequest=802)
--
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: commits-unsubscribe@baremaps.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve workflow package [incubator-baremaps]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #802:
URL: https://github.com/apache/incubator-baremaps/pull/802#issuecomment-1808399371
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_baremaps&pullRequest=802)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802&metric=new_duplicated_lines_density&view=list) [22.0% Duplication](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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: commits-unsubscribe@baremaps.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve workflow package [incubator-baremaps]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #802:
URL: https://github.com/apache/incubator-baremaps/pull/802#issuecomment-1852172313
## [](https://sonarcloud.io/dashboard?id=apache_baremaps&pullRequest=802) **Quality Gate failed**
Failed conditions
[1 Security Hotspot](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&inNewCodePeriod=true)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_baremaps&pullRequest=802)
--
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: commits-unsubscribe@baremaps.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve workflow package [incubator-baremaps]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #802:
URL: https://github.com/apache/incubator-baremaps/pull/802#issuecomment-1853661259
## [](https://sonarcloud.io/dashboard?id=apache_baremaps&pullRequest=802) **Quality Gate failed**
Failed conditions
[1 Security Hotspot](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&inNewCodePeriod=true)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_baremaps&pullRequest=802)
--
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: commits-unsubscribe@baremaps.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve workflow package [incubator-baremaps]
Posted by "bchapuis (via GitHub)" <gi...@apache.org>.
bchapuis merged PR #802:
URL: https://github.com/apache/incubator-baremaps/pull/802
--
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: commits-unsubscribe@baremaps.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve workflow package [incubator-baremaps]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #802:
URL: https://github.com/apache/incubator-baremaps/pull/802#issuecomment-1853401494
## [](https://sonarcloud.io/dashboard?id=apache_baremaps&pullRequest=802) **Quality Gate failed**
Failed conditions
[1 Security Hotspot](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&inNewCodePeriod=true)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_baremaps&pullRequest=802)
--
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: commits-unsubscribe@baremaps.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve workflow package [incubator-baremaps]
Posted by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org>.
github-advanced-security[bot] commented on code in PR #802:
URL: https://github.com/apache/incubator-baremaps/pull/802#discussion_r1398293238
##########
baremaps-core/src/main/java/org/apache/baremaps/workflow/WorkflowContext.java:
##########
@@ -41,4 +67,54 @@
return dataSources.computeIfAbsent(database, PostgresUtils::createDataSourceFromObject);
}
+ public DataMap<Long, Coordinate> getCoordinateMap(Path path) throws IOException {
+ if (Files.size(path) > 1 << 30) {
+ return getAlignedCoordinateMap();
+ } else {
+ return getMonotonicCoordinateMap();
+ }
+ }
+
+ public DataMap<Long, Coordinate> getAlignedCoordinateMap() throws IOException {
+ var coordinateDir = Files.createDirectories(cacheDir.resolve("coordinates"));
+ return new MemoryAlignedDataMap<>(
+ new LonLatDataType(),
+ new MemoryMappedDirectory(coordinateDir));
+ }
+
+ public DataMap<Long, Coordinate> getMonotonicCoordinateMap() throws IOException {
+ var coordinateKeysDir = Files.createDirectories(cacheDir.resolve("coordinate_keys"));
+ var coordinateValuesDir = Files.createDirectories(cacheDir.resolve("coordinate_values"));
+ return new MonotonicDataMap<>(
+ new MemoryAlignedDataList<>(
+ new PairDataType<>(new LongDataType(), new LongDataType()),
+ new MemoryMappedDirectory(coordinateKeysDir)),
+ new AppendOnlyBuffer<>(
+ new LonLatDataType(),
+ new MemoryMappedDirectory(coordinateValuesDir)));
+ }
+
+ public DataMap<Long, List<Long>> getReferenceMap(Path path) throws IOException {
Review Comment:
## Useless parameter
The parameter 'path' is never used.
[Show more details](https://github.com/apache/incubator-baremaps/security/code-scanning/844)
--
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: commits-unsubscribe@baremaps.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve workflow package [incubator-baremaps]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #802:
URL: https://github.com/apache/incubator-baremaps/pull/802#issuecomment-1816703066
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_baremaps&pullRequest=802)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT) [1 Security Hotspot](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL) [5 Code Smells](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802&metric=new_duplicated_lines_density&view=list) [2.3% Duplication](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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: commits-unsubscribe@baremaps.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve workflow package [incubator-baremaps]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #802:
URL: https://github.com/apache/incubator-baremaps/pull/802#issuecomment-1808216077
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_baremaps&pullRequest=802)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL) [5 Code Smells](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802&metric=new_duplicated_lines_density&view=list) [18.7% Duplication](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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: commits-unsubscribe@baremaps.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve workflow package [incubator-baremaps]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #802:
URL: https://github.com/apache/incubator-baremaps/pull/802#issuecomment-1815339923
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_baremaps&pullRequest=802)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL) [7 Code Smells](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802&metric=new_duplicated_lines_density&view=list) [22.0% Duplication](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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: commits-unsubscribe@baremaps.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve workflow package [incubator-baremaps]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #802:
URL: https://github.com/apache/incubator-baremaps/pull/802#issuecomment-1816675574
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_baremaps&pullRequest=802)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT) [1 Security Hotspot](https://sonarcloud.io/project/security_hotspots?id=apache_baremaps&pullRequest=802&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL) [5 Code Smells](https://sonarcloud.io/project/issues?id=apache_baremaps&pullRequest=802&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802) No Coverage information
[](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802&metric=new_duplicated_lines_density&view=list) [2.3% Duplication](https://sonarcloud.io/component_measures?id=apache_baremaps&pullRequest=802&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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: commits-unsubscribe@baremaps.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org