Skip to content

Commit

Permalink
VIH-11085 Add OSV Scanner GitHub action (#1452)
Browse files Browse the repository at this point in the history
* VIH-11085 Add OSV Scanner GitHub action

* Create launch-darkly-flag-sync.yml
  • Loading branch information
shaed-parkar authored Nov 29, 2024
1 parent a40bd31 commit 4917627
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/launch-darkly-flag-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Find LaunchDarkly flag code references
on: push
# cancel in-flight workflow run if another push was triggered
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
launchDarklyCodeReferences:
name: LaunchDarkly Code References
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 11 # This value must be set if the lookback configuration option is not disabled for find-code-references. Read more: https://github.com/launchdarkly/ld-find-code-refs#searching-for-unused-flags-extinctions
- name: LaunchDarkly Code References
uses: launchdarkly/find-code-references@v2
with:
accessToken: ${{ secrets.LD_SERVICE_TOKEN }}
projKey: VH
debug: true
prune: true
20 changes: 20 additions & 0 deletions .github/workflows/osv-scanner-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: OSV-Scanner PR Scan

# Change "main" to your default branch if you use a different name, i.e. "master"
on:
pull_request:
branches: [master]
merge_group:
branches: [master]

permissions:
# Required to upload SARIF file to CodeQL. See: https://github.com/github/codeql-action/issues/2117
actions: read
# Require writing security events to upload SARIF file to security tab
security-events: write
# Only need to read contents
contents: read

jobs:
scan-pr:
uses: 'google/osv-scanner-action/.github/workflows/[email protected]'

0 comments on commit 4917627

Please sign in to comment.