Skip to content

Commit cbfdd5a

Browse files
workflow: add needed workflow
1 parent f3d6e3b commit cbfdd5a

File tree

3 files changed

+113
-0
lines changed

3 files changed

+113
-0
lines changed

.github/workflows/codeql.yml

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
3+
# For most projects, this workflow file will not need changing; you simply need
4+
# to commit it to your repository.
5+
#
6+
# You may wish to alter this file to override the set of languages analyzed,
7+
# or to provide custom queries or build logic.
8+
#
9+
# ******** NOTE ********
10+
# We have attempted to detect the languages in your repository. Please check
11+
# the `language` matrix defined below to confirm you have the correct set of
12+
# supported CodeQL languages.
13+
#
14+
name: "CodeQL"
15+
16+
on:
17+
push:
18+
branches: ["main"]
19+
pull_request:
20+
# The branches below must be a subset of the branches above
21+
branches: ["main"]
22+
schedule:
23+
- cron: "0 0 * * 1"
24+
25+
permissions:
26+
contents: read
27+
28+
jobs:
29+
analyze:
30+
name: Analyze
31+
runs-on: ubuntu-latest
32+
permissions:
33+
actions: read
34+
contents: read
35+
security-events: write
36+
37+
strategy:
38+
fail-fast: false
39+
matrix:
40+
language: ["javascript", "typescript"]
41+
# CodeQL supports [ $supported-codeql-languages ]
42+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
43+
44+
steps:
45+
- name: Harden Runner
46+
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
47+
with:
48+
egress-policy: audit
49+
50+
- name: Checkout repository
51+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
52+
53+
# Initializes the CodeQL tools for scanning.
54+
- name: Initialize CodeQL
55+
uses: github/codeql-action/init@0701025a8b1600e416be4f3bb5a830b1aa6af01e # v3.28.6
56+
with:
57+
# https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#example-configuration
58+
languages: ${{ matrix.language }}
59+
config: |
60+
paths-ignore:
61+
- '**/*.test.js'
62+
- '**/*.test.mjs'
63+
- '**/*.bench.js'
64+
- '**/*.bench.mjs'
65+
66+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
67+
# If this step fails, then you should remove it and run the build manually (see below)
68+
- name: Autobuild
69+
uses: github/codeql-action/autobuild@0701025a8b1600e416be4f3bb5a830b1aa6af01e # v3.28.6
70+
71+
# ℹ️ Command-line programs to run using the OS shell.
72+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
73+
74+
# If the Autobuild fails above, remove it and uncomment the following three lines.
75+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
76+
77+
# - run: |
78+
# echo "Run, Build Application using script"
79+
# ./location_of_script_within_repo/buildscript.sh
80+
81+
- name: Perform CodeQL Analysis
82+
uses: github/codeql-action/analyze@0701025a8b1600e416be4f3bb5a830b1aa6af01e # v3.28.6
83+
with:
84+
category: "/language:${{matrix.language}}"
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
3+
# Dependency Review Action
4+
#
5+
# This Action will scan dependency manifest files that change as part of a Pull Request,
6+
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
7+
# Once installed, if the workflow run is marked as required,
8+
# PRs introducing known-vulnerable packages will be blocked from merging.
9+
#
10+
# Source repository: https://github.com/actions/dependency-review-action
11+
name: 'Dependency Review'
12+
on: [pull_request]
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
dependency-review:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Harden Runner
22+
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
23+
with:
24+
egress-policy: audit
25+
26+
- name: 'Checkout Repository'
27+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
- name: 'Dependency Review'
29+
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0
File renamed without changes.

0 commit comments

Comments
 (0)