Skip to content

Commit 71547e2

Browse files
committed
Improve documentation
1 parent d714f05 commit 71547e2

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

.github/workflows/sample.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
scan:
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: GitHubSecurityLab/pwn-request-scanner@9791f6e2ab36a9ca92342d4b2adc749e870133b9
23+
- uses: GitHubSecurityLab/pwn-request-scanner@9791f6e2ab36a9ca92342d4b2adc749e870133b9 # v1
2424
with:
2525
owner: ${{ inputs.owner }}
2626
repo: ${{ inputs.repo }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ The `pwn request scanner` is a simple tool that doesn't go into depths of analyz
1111
You can run the scanner as:
1212

1313
* GitHub Action in your repository. Just copy the [sample workflow](.github/workflows/sample.yml).
14-
* Locally running the [index.js](dist/index.js) script from the dist folder.
14+
* Locally running the [index.js](dist/index.js) script from the dist folder. Set environment variable `GITHUB_TOKEN` to your Personal Access Token (PAT).

dist/index.js

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

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/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ if (process.env.GITHUB_ACTIONS) {
122122
if (process.argv.length < 4) {
123123
printUsageAndExit();
124124
}
125+
if (process.env.GITHUB_TOKEN === undefined) {
126+
console.log('Error: GITHUB_TOKEN environment variable is not set.');
127+
process.exit(1);
128+
}
125129
verbose = process.argv.length > 4 && process.argv[4] === '--verbose' ? true : false;
126130
run(process.argv[2], process.argv[3], process.env.GITHUB_TOKEN).catch(error => {
127131
console.log(`Error: ${error}`);

0 commit comments

Comments
 (0)