File tree 2 files changed +10
-16
lines changed
smoke-tests-otel-starter/spring-boot-3/src/test/java/io/opentelemetry/spring/smoketest
2 files changed +10
-16
lines changed Original file line number Diff line number Diff line change 1
- name : OSSF Scorecard
1
+ name : OpenSSF Scorecard analysis
2
2
3
3
on :
4
4
push :
5
5
branches :
6
6
- main
7
7
schedule :
8
8
- cron : " 43 6 * * 5" # weekly at 06:43 (UTC) on Friday
9
- workflow_dispatch :
10
9
11
10
permissions : read-all
12
11
13
12
jobs :
14
13
analysis :
15
14
runs-on : ubuntu-latest
16
15
permissions :
17
- # Needed for Code scanning upload
18
- security-events : write
19
- # Needed for GitHub OIDC token if publish_results is true
20
- id-token : write
16
+ security-events : write # for Code scanning upload
17
+ id-token : write # for authentication when uploading to scorecard
21
18
steps :
22
19
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23
20
with :
@@ -29,18 +26,15 @@ jobs:
29
26
results_format : sarif
30
27
publish_results : true
31
28
32
- # Upload the results as artifacts (optional). Commenting out will disable
33
- # uploads of run results in SARIF format to the repository Actions tab.
34
- # https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts
29
+ # Upload the results as artifacts
35
30
- name : " Upload artifact"
36
31
uses : actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
37
32
with :
38
33
name : SARIF file
39
34
path : results.sarif
40
35
retention-days : 5
41
36
42
- # Upload the results to GitHub's code scanning dashboard (optional).
43
- # Commenting out will disable upload of results to your repo's Code Scanning dashboard
37
+ # Upload the results to GitHub's code scanning dashboard
44
38
- name : " Upload to code-scanning"
45
39
uses : github/codeql-action/upload-sarif@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
46
40
with :
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class OtelSpringStarterSmokeTest extends AbstractOtelSpringStarterSmokeTest {
26
26
27
27
@ Override
28
28
protected void assertAdditionalMetrics () {
29
- if (!isJfrAvailable ()) {
29
+ if (!isFlightRecorderAvailable ()) {
30
30
return ;
31
31
}
32
32
@@ -50,11 +50,11 @@ protected void assertAdditionalMetrics() {
50
50
}
51
51
}
52
52
53
- private static boolean isJfrAvailable () {
53
+ private static boolean isFlightRecorderAvailable () {
54
54
try {
55
- Class . forName ( "jdk.jfr.FlightRecorder" );
56
- return true ;
57
- } catch (ClassNotFoundException exception ) {
55
+ return ( boolean )
56
+ Class . forName ( "jdk.jfr.FlightRecorder" ). getMethod ( "isAvailable" ). invoke ( null ) ;
57
+ } catch (ReflectiveOperationException exception ) {
58
58
return false ;
59
59
}
60
60
}
You can’t perform that action at this time.
0 commit comments