Skip to content

Commit a0817a4

Browse files
authored
Merge branch 'main' into dependabot/gradle/test/fixtures/hdfs-fixture/ch.qos.logback-logback-classic-1.5.18
Signed-off-by: Craig Perkins <[email protected]>
2 parents 1eca467 + 15d27a1 commit a0817a4

File tree

88 files changed

+4475
-61
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+4475
-61
lines changed

.github/workflows/links.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/checkout@v4
1414
- name: lychee Link Checker
1515
id: lychee
16-
uses: lycheeverse/lychee-action@v2.3.0
16+
uses: lycheeverse/lychee-action@v2.4.0
1717
with:
1818
args: --accept=200,403,429 --exclude-mail **/*.html **/*.md **/*.txt **/*.json --exclude-file .lychee.excludes
1919
fail: true

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
99
- [Rule Based Auto-tagging] Add rule schema for auto tagging ([#17238](https://github.com/opensearch-project/OpenSearch/pull/17238))
1010
- Renaming the node role search to warm ([#17573](https://github.com/opensearch-project/OpenSearch/pull/17573))
1111
- Introduce a new search node role to hold search only shards ([#17620](https://github.com/opensearch-project/OpenSearch/pull/17620))
12-
- Fix systemd integTest on deb regarding path ownership check ([#17641](https://github.com/opensearch-project/OpenSearch/pull/17641))
12+
- Fix systemd integTest on deb regarding path ownership check ([#17641](https://github.com/opensearch-project/OpenSearch/pull/17641))
1313
- Add dfs transformation function in XContentMapValues ([#17612](https://github.com/opensearch-project/OpenSearch/pull/17612))
1414
- Added Kinesis support as a plugin for the pull-based ingestion ([#17615](https://github.com/opensearch-project/OpenSearch/pull/17615))
1515
- [Security Manager Replacement] Create initial Java Agent to intercept Socket::connect calls ([#17724](https://github.com/opensearch-project/OpenSearch/pull/17724))
16+
- Add ingestion management APIs for pause, resume and get ingestion state ([#17631](https://github.com/opensearch-project/OpenSearch/pull/17631))
17+
- [Security Manager Replacement] Enhance Java Agent to intercept System::exit ([#17746](https://github.com/opensearch-project/OpenSearch/pull/17746))
1618

1719
### Changed
1820
- Migrate BC libs to their FIPS counterparts ([#14912](https://github.com/opensearch-project/OpenSearch/pull/14912))
@@ -21,13 +23,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
2123
- Bump `com.nimbusds:nimbus-jose-jwt` from 9.41.1 to 10.0.2 ([#17607](https://github.com/opensearch-project/OpenSearch/pull/17607), [#17669](https://github.com/opensearch-project/OpenSearch/pull/17669))
2224
- Bump `com.google.api:api-common` from 1.8.1 to 2.46.1 ([#17604](https://github.com/opensearch-project/OpenSearch/pull/17604))
2325
- Bump `ch.qos.logback:logback-core` from 1.5.16 to 1.5.17 ([#17609](https://github.com/opensearch-project/OpenSearch/pull/17609))
24-
- Bump `org.jruby.joni:joni` from 2.2.3 to 2.2.5 ([#17608](https://github.com/opensearch-project/OpenSearch/pull/17608))
26+
- Bump `org.jruby.joni:joni` from 2.2.3 to 2.2.6 ([#17608](https://github.com/opensearch-project/OpenSearch/pull/17608), [#17732](https://github.com/opensearch-project/OpenSearch/pull/17732))
2527
- Bump `dangoslen/dependabot-changelog-helper` from 3 to 4 ([#17498](https://github.com/opensearch-project/OpenSearch/pull/17498))
2628
- Bump `com.google.api:gax` from 2.35.0 to 2.63.1 ([#17465](https://github.com/opensearch-project/OpenSearch/pull/17465))
2729
- Bump `com.azure:azure-storage-blob` from 12.29.1 to 12.30.0 ([#17667](https://github.com/opensearch-project/OpenSearch/pull/17667))
2830
- Bump `tj-actions/changed-files` from 46.0.1 to 46.0.3 ([#17666](https://github.com/opensearch-project/OpenSearch/pull/17666))
2931
- Bump `com.google.code.gson:gson` from 2.11.0 to 2.12.1 ([#17668](https://github.com/opensearch-project/OpenSearch/pull/17668))
3032
- Bump `com.github.luben:zstd-jni` from 1.5.5-1 to 1.5.6-1 ([#17674](https://github.com/opensearch-project/OpenSearch/pull/17674))
33+
- Bump `lycheeverse/lychee-action` from 2.3.0 to 2.4.0 ([#17731](https://github.com/opensearch-project/OpenSearch/pull/17731))
34+
- Bump `com.netflix.nebula.ospackage-base` from 11.11.1 to 11.11.2 ([#17734](https://github.com/opensearch-project/OpenSearch/pull/17734))
3135
- Bump `ch.qos.logback:logback-classic` from 1.5.17 to 1.5.18 ([#17730](https://github.com/opensearch-project/OpenSearch/pull/17730))
3236

3337
### Changed

distribution/packages/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ import java.util.regex.Pattern
6363
*/
6464

6565
plugins {
66-
id "com.netflix.nebula.ospackage-base" version "11.11.1"
66+
id "com.netflix.nebula.ospackage-base" version "11.11.2"
6767
}
6868

6969
void addProcessFilesTask(String type, boolean jdk) {

doc-tools/missing-doclet/src/main/java/org/opensearch/missingdoclet/MissingDoclet.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ private void check(Element element) {
235235
case INTERFACE:
236236
case ENUM:
237237
case ANNOTATION_TYPE:
238+
case RECORD:
238239
if (level(element) >= CLASS) {
239240
checkComment(element);
240241
for (var subElement : element.getEnclosedElements()) {
@@ -343,7 +344,7 @@ private boolean isGenerated(Element element) {
343344
if (!isGenerated && element.getEnclosingElement() != null) {
344345
// check if enclosing element is generated
345346
return isGenerated(element.getEnclosingElement());
346-
}
347+
}
347348

348349
return isGenerated;
349350
}

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ junit = "4.13.2"
7272
hamcrest = "2.1"
7373
mockito = "5.16.1"
7474
objenesis = "3.3"
75-
bytebuddy = "1.17.4"
75+
bytebuddy = "1.17.5"
7676

7777
# benchmark dependencies
7878
jmh = "1.35"

libs/agent-sm/agent/build.gradle

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ dependencies {
1313
implementation project(":libs:agent-sm:bootstrap")
1414
implementation "net.bytebuddy:byte-buddy:${versions.bytebuddy}"
1515
compileOnly "com.google.code.findbugs:jsr305:3.0.2"
16+
17+
testImplementation "junit:junit:${versions.junit}"
18+
testImplementation "org.hamcrest:hamcrest:${versions.hamcrest}"
1619
}
1720

1821
var bootClasspath = configurations.bootstrap.incoming.artifactView { }.files
@@ -35,8 +38,8 @@ compileJava {
3538
options.compilerArgs -= '-Werror'
3639
}
3740

38-
test.enabled = false
3941
testingConventions.enabled = false
42+
tasks.named('forbiddenApisTest').configure { onlyIf { false } }
4043

4144
tasks.named('forbiddenApisMain').configure {
4245
replaceSignatureFiles 'jdk-signatures'
@@ -62,3 +65,12 @@ thirdPartyAudit {
6265
tasks.named('validateNebulaPom') {
6366
dependsOn prepareAgent
6467
}
68+
69+
tasks.test {
70+
dependsOn prepareAgent
71+
jvmArgs += ["-javaagent:" + project.jar.archiveFile.get()]
72+
}
73+
74+
tasks.check {
75+
dependsOn test
76+
}

libs/agent-sm/agent/licenses/byte-buddy-1.17.4.jar.sha1

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
88450f120903b7e72470462cdbd2b75a3842223c

libs/agent-sm/agent/src/main/java/org/opensearch/javaagent/Agent.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,13 @@ private static AgentBuilder createAgentBuilder(Instrumentation inst) throws Exce
7777
.with(AgentBuilder.TypeStrategy.Default.REDEFINE)
7878
.ignore(ElementMatchers.none())
7979
.type(systemType)
80-
.transform(transformer);
80+
.transform(transformer)
81+
.type(ElementMatchers.is(java.lang.System.class))
82+
.transform(
83+
(b, typeDescription, classLoader, module, pd) -> b.visit(
84+
Advice.to(SystemExitInterceptor.class).on(ElementMatchers.named("exit"))
85+
)
86+
);
8187

8288
return agentBuilder;
8389
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* The OpenSearch Contributors require contributions made to
5+
* this file be licensed under the Apache-2.0 license or a
6+
* compatible open source license.
7+
*/
8+
9+
package org.opensearch.javaagent;
10+
11+
import org.opensearch.javaagent.bootstrap.AgentPolicy;
12+
13+
import java.lang.StackWalker.Option;
14+
15+
import net.bytebuddy.asm.Advice;
16+
17+
/**
18+
* {@link System#exit} interceptor
19+
*/
20+
public class SystemExitInterceptor {
21+
/**
22+
* SystemExitInterceptor
23+
*/
24+
public SystemExitInterceptor() {}
25+
26+
/**
27+
* Interceptor
28+
* @param code exit code
29+
* @throws Exception exceptions
30+
*/
31+
@Advice.OnMethodEnter()
32+
public static void intercept(int code) throws Exception {
33+
final StackWalker walker = StackWalker.getInstance(Option.RETAIN_CLASS_REFERENCE);
34+
final Class<?> caller = walker.getCallerClass();
35+
36+
if (!AgentPolicy.isClassThatCanExit(caller.getName())) {
37+
throw new SecurityException("The class " + caller + " is not allowed to call System::exit(" + code + ")");
38+
}
39+
}
40+
}

0 commit comments

Comments
 (0)