Skip to content
Merged
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
96 changes: 96 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,99 @@ updates:
reviewers:
- "microsoft/clr-instrumentation-engine-owners"
target-branch: "main"


- package-ecosystem: nuget
directory: /src/Dependencies
schedule:
interval: daily

- package-ecosystem: nuget
directory: /src/Extensions.Base.Api.Tests
schedule:
interval: daily

- package-ecosystem: nuget
directory: /src/Extensions.Base.Api
schedule:
interval: daily

- package-ecosystem: nuget
directory: /src/InstrumentationEngine.Attach
schedule:
interval: daily

- package-ecosystem: nuget
directory: /src/InstrumentationEngine.Installer.NuGet/Module
schedule:
interval: daily

- package-ecosystem: nuget
directory: /src/InstrumentationEngine.NuGet.Headers
schedule:
interval: daily

- package-ecosystem: nuget
directory: /src/InstrumentationEngine.NuGet
schedule:
interval: daily

- package-ecosystem: nuget
directory: /src/InstrumentationEngine.SiteExtension
schedule:
interval: daily

- package-ecosystem: nuget
directory: /src/InstrumentationEngine.XdtExtensions
schedule:
interval: daily

- package-ecosystem: nuget
directory: /src/Tests/InstrEngineTests/InstrEngineTests
schedule:
interval: daily

- package-ecosystem: nuget
directory: /src/Tests/InstrEngineTests/TestAppRunner
schedule:
interval: daily

- package-ecosystem: nuget
directory: /src/Tests/RemoteUnitTestExecutor.Host
schedule:
interval: daily

- package-ecosystem: nuget
directory: /src/Tests/RemoteUnitTestExecutor
schedule:
interval: daily

- package-ecosystem: nuget
directory: /src/unix/dependencies
schedule:
interval: daily

- package-ecosystem: docker
directory: /src/unix/docker/dockerfiles/build/alpine
schedule:
interval: daily

- package-ecosystem: docker
directory: /src/unix/docker/dockerfiles/build/ubuntu
schedule:
interval: daily

- package-ecosystem: nuget
directory: /tests/ApplicationInsightsCompatibility/Intercept.2.0.1.Tests
schedule:
interval: daily

- package-ecosystem: nuget
directory: /tests/ApplicationInsightsCompatibility/Intercept.Latest.Tests
schedule:
interval: daily

- package-ecosystem: nuget
directory: /tests/RawProfilerHook/RawProfilerHook.Tests
schedule:
interval: daily
16 changes: 12 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ name: build

on: [push]

permissions:
contents: read

jobs:
build:
strategy:
Expand All @@ -18,9 +21,14 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: Harden Runner
uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776 # v2.2.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0

- uses: actions/cache@v3
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: out/packages
key: nuget
Expand All @@ -29,14 +37,14 @@ jobs:

- name: archive so
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: libInstrumentationEngine.so
path: out/Linux/bin/x64.Release/ClrInstrumentationEngine/libInstrumentationEngine.so

- name: archive dylib
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: libInstrumentationEngine.dylib
path: out/OSX/bin/x64.Release/ClrInstrumentationEngine/libInstrumentationEngine.dylib
27 changes: 27 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request,
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
# Once installed, if the workflow run is marked as required,
# PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776 # v2.2.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- name: 'Checkout Repository'
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
- name: 'Dependency Review'
uses: actions/dependency-review-action@0efb1d1d84fc9633afcdaad14c485cbbc90ef46c # v2.5.1
12 changes: 10 additions & 2 deletions .github/workflows/markdown-link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,20 @@ on:
branches:
- main

permissions:
contents: read

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gaurav-nelson/github-action-markdown-link-check@v1
- name: Harden Runner
uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776 # v2.2.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
- uses: gaurav-nelson/github-action-markdown-link-check@5c5dfc0ac2e225883c0e5f03a85311ec2830d368 # v1
with:
config-file: .github/linters/check_links_config.json
use-quiet-mode: 'yes'
Expand Down
76 changes: 76 additions & 0 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# This workflow uses actions that are not certified by GitHub. They are provided
# by a third-party and are governed by separate terms of service, privacy
# policy, and support documentation.

name: Scorecard supply-chain security
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '20 7 * * 2'
push:
branches: ["main"]

# Declare default permissions as read only.
permissions: read-all

jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write
contents: read
actions: read

steps:
- name: Harden Runner
uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776 # v2.2.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- name: "Checkout code"
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d # v2.0.6
with:
results_file: results.sarif
results_format: sarif
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
# - you want to enable the Branch-Protection check on a *public* repository, or
# - you are installing Scorecards on a *private* repository
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
# repo_token: ${{ secrets.SCORECARD_TOKEN }}

# Public repositories:
# - Publish results to OpenSSF REST API for easy access by consumers
# - Allows the repository to include the Scorecard badge.
# - See https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories:
# - `publish_results` will always be set to `false`, regardless
# of the value entered here.
publish_results: true

# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@67a35a08586135a9573f4327e904ecbf517a882d # v2.2.8
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion src/unix/docker/dockerfiles/build/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

FROM mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.13-20211214164113-8a6f4f3
FROM mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.13-20211214164113-8a6f4f3@sha256:5ee23bef02e18237d1874a4f530e0b7d12ca803af87b2516717565f90540c25c

WORKDIR /

Expand Down
2 changes: 1 addition & 1 deletion src/unix/docker/dockerfiles/build/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Licensed under the MIT License.

# This image is based on the public Ubuntu 18.04 LTS image
FROM mcr.microsoft.com/mirror/docker/library/ubuntu:18.04
FROM mcr.microsoft.com/mirror/docker/library/ubuntu:18.04@sha256:8aa9c2798215f99544d1ce7439ea9c3a6dfd82de607da1cec3a8a2fae005931b

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
Expand Down