File tree Expand file tree Collapse file tree 2 files changed +10
-16
lines changed
smoke-tests-otel-starter/spring-boot-3/src/test/java/io/opentelemetry/spring/smoketest Expand file tree Collapse file tree 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
22
33on :
44 push :
55 branches :
66 - main
77 schedule :
88 - cron : " 43 6 * * 5" # weekly at 06:43 (UTC) on Friday
9- workflow_dispatch :
109
1110permissions : read-all
1211
1312jobs :
1413 analysis :
1514 runs-on : ubuntu-latest
1615 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
2118 steps :
2219 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2320 with :
@@ -29,18 +26,15 @@ jobs:
2926 results_format : sarif
3027 publish_results : true
3128
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
3530 - name : " Upload artifact"
3631 uses : actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
3732 with :
3833 name : SARIF file
3934 path : results.sarif
4035 retention-days : 5
4136
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
4438 - name : " Upload to code-scanning"
4539 uses : github/codeql-action/upload-sarif@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
4640 with :
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class OtelSpringStarterSmokeTest extends AbstractOtelSpringStarterSmokeTest {
2626
2727 @ Override
2828 protected void assertAdditionalMetrics () {
29- if (!isJfrAvailable ()) {
29+ if (!isFlightRecorderAvailable ()) {
3030 return ;
3131 }
3232
@@ -50,11 +50,11 @@ protected void assertAdditionalMetrics() {
5050 }
5151 }
5252
53- private static boolean isJfrAvailable () {
53+ private static boolean isFlightRecorderAvailable () {
5454 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 ) {
5858 return false ;
5959 }
6060 }
You can’t perform that action at this time.
0 commit comments