-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (61 loc) · 2.65 KB
/
codeql.yml
File metadata and controls
72 lines (61 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: CodeQL Security Analysis
on:
# CodeQL disabled for rclone as it uses pre-compiled binaries
# push:
# branches: [ main, develop ]
# pull_request:
# branches: [ main ]
# schedule:
# # Run CodeQL analysis weekly on Tuesday at 6 AM UTC
# - cron: '0 6 * * 2'
workflow_dispatch:
jobs:
analyze:
name: Analyze Code
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
# required for all workflows
security-events: write
# required to fetch internal or private CodeQL packs
packages: read
# only required for workflows in private repositories
actions: read
contents: read
# Skip matrix strategy for this project since it uses pre-compiled binaries
# Only run on manual dispatch for shell script analysis if needed
if: github.event_name == 'workflow_dispatch'
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: javascript
# Analyze JavaScript/shell scripts for this containerized binary project
queries: +security-extended,security-and-quality
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below).
- name: Autobuild
uses: github/codeql-action/autobuild@v4
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:javascript"
- name: CodeQL Analysis Summary
if: always()
run: |
echo "## CodeQL Analysis Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Project | Status |" >> $GITHUB_STEP_SUMMARY
echo "|---------|---------|" >> $GITHUB_STEP_SUMMARY
echo "| rclone | ${{ job.status }} |" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "📊 **View detailed results:** [Security tab](https://github.com/${{ github.repository }}/security/code-scanning)" >> $GITHUB_STEP_SUMMARY