1111 description : ' Repository that requested the scan'
1212 required : false
1313 type : string
14- scanner_ref :
15- description : ' Reference to the scanner repository'
16- required : false
17- type : string
18- default : ' main'
19- languages_config :
14+ default : ${{ github.repository }}
15+ languages-config :
2016 description : |
2117 Optional: JSON array of language configurations to override/supplement repo config file.
2218 Auto-detects languages and loads repo-specific config from packages/codeql-action/repo-configs/${repo}.cjs.
3834 required : false
3935 type : string
4036 default : ' '
41- paths_ignored :
37+ scanner-ref :
38+ description : ' The git ref of the scanner to use'
39+ required : true
40+ type : string
41+ paths-ignored :
4242 description : ' Multi-line list of paths to ignore during scan (one path per line, supports glob patterns)'
4343 required : false
4444 type : string
4545 default : ' '
46- rules_excluded :
46+ rules-excluded :
4747 description : ' Comma delimited IDs of rules to exclude'
4848 required : false
4949 type : string
5050 default : ' '
51- project_metrics_token :
51+ project-metrics-token :
5252 description : ' Analytics token to log failed builds'
5353 required : false
5454 type : string
5555 default : ' '
56- slack_webhook :
56+ slack-webhook :
5757 description : ' Slack webhook for notifications'
5858 required : false
5959 type : string
6565jobs :
6666 # Detect languages and create matrix
6767 setup :
68+ name : Setup
6869 runs-on : ubuntu-latest
6970 outputs :
7071 matrix : ${{ steps.detect-languages.outputs.matrix }}
7374 uses : actions/checkout@v4
7475 with :
7576 repository : MetaMask/action-security-code-scanner
76- ref : ${{ inputs.scanner_ref || 'main' }}
77+ ref : ${{ inputs.scanner-ref }}
7778 path : ${{ env.MONOREPO_PATH }}
7879
7980 - name : Checkout target repository
@@ -87,10 +88,11 @@ jobs:
8788 uses : ./.security-scanner/packages/language-detector
8889 with :
8990 repo : ${{ inputs.repo }}
90- languages_config : ${{ inputs.languages_config }}
91+ languages_config : ${{ inputs.languages-config }}
9192
9293 # Run CodeQL analysis for each detected language
9394 codeql-analysis :
95+ name : CodeQL analysis
9496 needs : setup
9597 if : ${{ fromJSON(needs.setup.outputs.matrix).include[0] != null }}
9698 strategy :
@@ -106,7 +108,7 @@ jobs:
106108 uses : actions/checkout@v4
107109 with :
108110 repository : MetaMask/action-security-code-scanner
109- ref : ${{ inputs.scanner_ref || 'main' }}
111+ ref : ${{ inputs.scanner-ref }}
110112 path : ${{ env.MONOREPO_PATH }}
111113
112114 - name : Checkout target repository
@@ -120,15 +122,16 @@ jobs:
120122 with :
121123 repo : ${{ inputs.repo }}
122124 language : ${{ matrix.language }}
123- paths_ignored : ${{ inputs.paths_ignored }}
124- rules_excluded : ${{ inputs.rules_excluded }}
125+ paths_ignored : ${{ inputs.paths-ignored }}
126+ rules_excluded : ${{ inputs.rules-excluded }}
125127 build_mode : ${{ matrix.build_mode }}
126128 build_command : ${{ matrix.build_command }}
127129 version : ${{ matrix.version }}
128130 distribution : ${{ matrix.distribution }}
129131
130132 # Run Semgrep analysis once for all languages
131133 semgrep-analysis :
134+ name : Semgrep analysis
132135 needs : setup
133136 runs-on : ubuntu-latest
134137 permissions :
@@ -140,7 +143,7 @@ jobs:
140143 uses : actions/checkout@v4
141144 with :
142145 repository : MetaMask/action-security-code-scanner
143- ref : ${{ inputs.scanner_ref || 'main' }}
146+ ref : ${{ inputs.scanner-ref }}
144147 path : ${{ env.MONOREPO_PATH }}
145148
146149 - name : Checkout target repository
@@ -152,19 +155,20 @@ jobs:
152155 - name : Run Semgrep Analysis
153156 uses : ./.security-scanner/packages/semgrep-action
154157 with :
155- paths_ignored : ${{ inputs.paths_ignored }}
158+ paths_ignored : ${{ inputs.paths-ignored }}
156159
157160 # Collect results and handle notifications
158161 finalize :
162+ name : Finalize scans and notify
159163 needs : [codeql-analysis, semgrep-analysis]
160164 if : always()
161165 runs-on : ubuntu-latest
162166 env :
163- SLACK_WEBHOOK : ${{ inputs.slack_webhook }}
164- PROJECT_METRICS_TOKEN : ${{ inputs.project_metrics_token }}
167+ SLACK_WEBHOOK : ${{ inputs.slack-webhook }}
168+ PROJECT_METRICS_TOKEN : ${{ inputs.project-metrics-token }}
165169 REPO : ${{ inputs.repo }}
166170 steps :
167- - name : Determine Overall Scan Success
171+ - name : Determine overall scan result
168172 id : scan-result
169173 env :
170174 CODEQL_RESULT : ${{ needs.codeql-analysis.result }}
0 commit comments