Skip to content

Commit 47d83db

Browse files
Merge pull request #51 from AikidoSec/fix/use-correct-startsWith
Fix: use correct startsWith function on string
2 parents cab786f + 8070af2 commit 47d83db

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
uses: actions/checkout@v4
2222

2323
- name: Detect new vulnerabilities
24-
uses: AikidoSec/[email protected].12
24+
uses: AikidoSec/[email protected].13
2525
with:
2626
secret-key: ${{ secrets.AIKIDO_SECRET_KEY }}
2727
fail-on-timeout: true

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ async function run() {
189189
core.info(`starting a scan with secret key: "${redactedToken}"`);
190190
}
191191
else {
192-
const isLikelyDependabotPr = ((_8 = startScanPayload.branch_name) !== null && _8 !== void 0 ? _8 : '').starts_with('dependabot/');
192+
const isLikelyDependabotPr = ((_8 = startScanPayload.branch_name) !== null && _8 !== void 0 ? _8 : '').startsWith('dependabot/');
193193
if (isLikelyDependabotPr) {
194194
core.info(`it looks like the action is running on a dependabot PR, this means that secret variables are not available in this context and thus we can not start a scan. Please see: https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/`);
195195
core.setOutput('outcome', STATUS_SUCCEEDED);

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ async function run(): Promise<void> {
7575
const redactedToken = '********************' + secretKey.slice(-4);
7676
core.info(`starting a scan with secret key: "${redactedToken}"`);
7777
} else {
78-
const isLikelyDependabotPr = (startScanPayload.branch_name ?? '').starts_with('dependabot/')
78+
const isLikelyDependabotPr = (startScanPayload.branch_name ?? '').startsWith('dependabot/')
7979
if (isLikelyDependabotPr) {
8080
core.info(`it looks like the action is running on a dependabot PR, this means that secret variables are not available in this context and thus we can not start a scan. Please see: https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/`);
8181
core.setOutput('outcome', STATUS_SUCCEEDED);

0 commit comments

Comments
 (0)