Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,085 changes: 934 additions & 151 deletions .github/patches/opentelemetry-java-instrumentation.patch

Large diffs are not rendered by default.

15 changes: 14 additions & 1 deletion .github/workflows/application-signals-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
role-to-assume: arn:aws:iam::${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ACCOUNT_ID }}:role/${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ROLE_NAME }}
aws-region: us-east-1

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: aws-opentelemetry-agent.jar

Expand Down Expand Up @@ -205,6 +205,19 @@ jobs:
java-version: '11'
cpu-architecture: 'arm64'

#
# UBUNTU COVERAGE
# DEFAULT SETTING: Java 11, EC2, AMD64, Ubuntu
#

v11-amd64-ubuntu:
needs: [ upload-main-build ]
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/java-ec2-ubuntu-test.yml@main
secrets: inherit
with:
aws-region: us-east-1
caller-workflow-name: 'main-build'

#
# Other Functional Test Case
#
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
snapshot-ecr-role: ${{ secrets.JAVA_INSTRUMENTATION_SNAPSHOT_ECR }}

- name: Upload to GitHub Actions
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: aws-opentelemetry-agent.jar
path: otelagent/build/libs/aws-opentelemetry-agent-*.jar
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-upstream-snapshot-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
snapshot-ecr-role: ${{ secrets.JAVA_INSTRUMENTATION_SNAPSHOT_ECR }}

- name: Upload to GitHub Actions
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: aws-opentelemetry-agent.jar
path: otelagent/build/libs/aws-opentelemetry-agent-*.jar
Expand Down
60 changes: 47 additions & 13 deletions .github/workflows/owasp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ jobs:
if: always()
run: |
gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 259A55407DD6C00299E6607EFFDE55BE73A2D1ED
VERSION=$(curl -s https://jeremylong.github.io/DependencyCheck/current.txt)
curl -Ls "https://github.com/jeremylong/DependencyCheck/releases/download/v$VERSION/dependency-check-$VERSION-release.zip" --output dependency-check.zip
curl -Ls "https://github.com/jeremylong/DependencyCheck/releases/download/v$VERSION/dependency-check-$VERSION-release.zip.asc" --output dependency-check.zip.asc
VERSION=$(curl -s https://jeremylong.github.io/DependencyCheck/current.txt | head -n1 | cut -d' ' -f1)
curl -Ls "https://github.com/dependency-check/DependencyCheck/releases/download/v$VERSION/dependency-check-$VERSION-release.zip" --output dependency-check.zip
curl -Ls "https://github.com/dependency-check/DependencyCheck/releases/download/v$VERSION/dependency-check-$VERSION-release.zip.asc" --output dependency-check.zip.asc
gpg --verify dependency-check.zip.asc
unzip dependency-check.zip
./dependency-check/bin/dependency-check.sh --failOnCVSS 0 --nvdApiKey ${{ env.NVD_API_KEY_NVD_API_KEY }} -s 'otelagent/build/libs/aws-opentelemetry-agent-*-SNAPSHOT.jar'
Expand All @@ -72,20 +72,36 @@ jobs:
if: ${{ steps.dep_scan.outcome != 'success' }}
run: less dependency-check-report.html

- name: Perform high image scan
- name: Perform high image scan on v1
if: always()
id: high_scan
id: high_scan_v1
uses: ./.github/actions/image_scan
with:
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v1.32.6"
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v2.0.0"
severity: 'CRITICAL,HIGH'

- name: Perform low image scan
- name: Perform low image scan on v1
if: always()
id: low_scan
id: low_scan_v1
uses: ./.github/actions/image_scan
with:
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v1.32.6"
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v2.0.0"
severity: 'MEDIUM,LOW,UNKNOWN'

- name: Perform high image scan on v2
if: always()
id: high_scan_v2
uses: ./.github/actions/image_scan
with:
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v2.0.0"
severity: 'CRITICAL,HIGH'

- name: Perform low image scan on v2
if: always()
id: low_scan_v2
uses: ./.github/actions/image_scan
with:
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v2.0.0"
severity: 'MEDIUM,LOW,UNKNOWN'

- name: Configure AWS Credentials for emitting metrics
Expand All @@ -95,19 +111,37 @@ jobs:
role-to-assume: ${{ secrets.METRICS_ROLE_ARN }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}

- name: Publish high scan status
- name: Publish high scan status on v1
if: always()
run: |
value="${{ steps.high_scan.outcome == 'success' && '1.0' || '0.0' }}"
value="${{ steps.high_scan_v1.outcome == 'success' && '1.0' || '0.0' }}"
aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \
--metric-name Success \
--dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=daily_scan_high \
--value $value

- name: Publish low scan status
- name: Publish high scan status on v2
if: always()
run: |
value="${{ steps.high_scan_v2.outcome == 'success' && '1.0' || '0.0' }}"
aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \
--metric-name Success \
--dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=daily_scan_high \
--value $value

- name: Publish low scan status on v1
if: always()
run: |
value="${{ steps.low_scan_v1.outcome == 'success' && steps.dep_scan.outcome == 'success' && '1.0' || '0.0'}}"
aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \
--metric-name Success \
--dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=daily_scan_low \
--value $value

- name: Publish low scan status on v2
if: always()
run: |
value="${{ steps.low_scan.outcome == 'success' && steps.dep_scan.outcome == 'success' && '1.0' || '0.0'}}"
value="${{ steps.low_scan_v2.outcome == 'success' && steps.dep_scan.outcome == 'success' && '1.0' || '0.0'}}"
aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \
--metric-name Success \
--dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=daily_scan_low \
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,17 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
run: |
# Download layer.zip from existing latest tagged SDK release note
LATEST_SDK_VERSION=$(gh release list --repo "aws-observability/aws-otel-java-instrumentation" --json tagName,isLatest -q 'map(select(.isLatest==true)) | .[0].tagName')
mkdir -p layer_artifact
gh release download "$LATEST_SDK_VERSION" --repo "aws-observability/aws-otel-java-instrumentation" --pattern "layer.zip" --dir layer_artifact
shasum -a 256 layer_artifact/layer.zip > layer_artifact/layer.zip.sha256

gh release create --target "$GITHUB_REF_NAME" \
--title "Release v${{ github.event.inputs.version }}" \
--draft \
"v${{ github.event.inputs.version }}" \
${{ env.ARTIFACT_NAME }} \
${{ env.ARTIFACT_NAME }}.sha256
${{ env.ARTIFACT_NAME }}.sha256 \
layer_artifact/layer.zip \
layer_artifact/layer.zip.sha256
Loading
Loading