René's URL Explorer Experiment


Title: Add a CLI interface to the upload-sarif action by robertbrignull · Pull Request #147 · github/codeql-action · GitHub

Open Graph Title: Add a CLI interface to the upload-sarif action by robertbrignull · Pull Request #147 · github/codeql-action

X Title: Add a CLI interface to the upload-sarif action by robertbrignull · Pull Request #147 · github/codeql-action

Description: This PR is a first attempt at adding a command lint interface to the codeql-action. This PR only deals with the upload-sarif action, and largely ignores the others except the minimum changes required to keep them working. The main things done here are: Introduce src/cli.ts which is the entrypoint to the CLI. I'm using the commander library here to do the CLI part, and it generates -h options and stuff like that. I'm open to other libraries instead if someone has a favourite that is better. Introduce a new build-cli npm script, that uses webpack to bundle the cli.ts file and all its dependencies into a single file, that is output to cli/cli.js. This file is not checked into the repository as it isn't needed to run the action normally. I felt it therefore didn't belong in the lib directory, but I don't think the cli directory name is great either. I'd be very open to suggestions here. Introduce logging.ts which mostly just wraps the @actions/core package, and replaces it with stuff like console.log when not on actions. Adds lots of extra function parameters. I think the way we're going to have to do things, is pass parameters from the entrypoint all the way into the functions that need them. That way the shared code doesn't have to have different cases for actions vs the CLI. At the entrypoints we pass the inputs, either from command line args, or core.getInput, or the environment, and pass it onwards to where it is needed. Hopefully this won't get too ugly. The diff looks huge because of node_modules changes, but if you ignore those and other generated files, the actual churn is only about 300 lines. This code is largely untested in practice. I wanted to get the PR up soon so people could see what it looks like. Merge / deployment checklist Confirm this change is backwards compatible with existing workflows. Confirm the readme has been updated if necessary.

Open Graph Description: This PR is a first attempt at adding a command lint interface to the codeql-action. This PR only deals with the upload-sarif action, and largely ignores the others except the minimum changes requir...

X Description: This PR is a first attempt at adding a command lint interface to the codeql-action. This PR only deals with the upload-sarif action, and largely ignores the others except the minimum changes requir...

Opengraph URL: https://github.com/github/codeql-action/pull/147

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:50d5fc0c-bc2f-f45b-852f-d0b326625a70
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9B44:2DCB9C:DBAFEB:12C62C1:6A5563BE
html-safe-noncee58dbb5d0c2cf43552efdcb9012b1465f361683fd311244ea582abb8f2f36e2f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QjQ0OjJEQ0I5QzpEQkFGRUI6MTJDNjJDMTo2QTU1NjNCRSIsInZpc2l0b3JfaWQiOiI0NjI0NjU4OTIxNjg0Mjk2NjM4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac2c7ccaa4d41b34c84f25bfb81c3e4d1ed05f6eef26c02ed9a59cac9cf9ab01e9
hovercard-subject-tagpull_request:465625862
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/github/codeql-action/pull/147/files
twitter:imagehttps://avatars.githubusercontent.com/u/3749000?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/3749000?s=400&v=4
og:image:altThis PR is a first attempt at adding a command lint interface to the codeql-action. This PR only deals with the upload-sarif action, and largely ignores the others except the minimum changes requir...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/github/codeql-action git https://github.com/github/codeql-action.git
octolytics-dimension-user_id9919
octolytics-dimension-user_logingithub
octolytics-dimension-repository_id259445878
octolytics-dimension-repository_nwogithub/codeql-action
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id259445878
octolytics-dimension-repository_network_root_nwogithub/codeql-action
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8201d0b7bc32164c4662de52242e463a356df543
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/codeql-action/pull/147/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql-action%2Fpull%2F147%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql-action%2Fpull%2F147%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=github%2Fcodeql-action
Reloadhttps://github.com/github/codeql-action/pull/147/files
Reloadhttps://github.com/github/codeql-action/pull/147/files
Reloadhttps://github.com/github/codeql-action/pull/147/files
Please reload this pagehttps://github.com/github/codeql-action/pull/147/files
github https://github.com/github
codeql-actionhttps://github.com/github/codeql-action
Notifications https://github.com/login?return_to=%2Fgithub%2Fcodeql-action
Fork 472 https://github.com/login?return_to=%2Fgithub%2Fcodeql-action
Star 1.6k https://github.com/login?return_to=%2Fgithub%2Fcodeql-action
Code https://github.com/github/codeql-action
Issues 156 https://github.com/github/codeql-action/issues
Pull requests 25 https://github.com/github/codeql-action/pulls
Actions https://github.com/github/codeql-action/actions
Models https://github.com/github/codeql-action/models
Security and quality 2 https://github.com/github/codeql-action/security
Insights https://github.com/github/codeql-action/pulse
Code https://github.com/github/codeql-action
Issues https://github.com/github/codeql-action/issues
Pull requests https://github.com/github/codeql-action/pulls
Actions https://github.com/github/codeql-action/actions
Models https://github.com/github/codeql-action/models
Security and quality https://github.com/github/codeql-action/security
Insights https://github.com/github/codeql-action/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fgithub%2Fcodeql-action%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgithub%2Fcodeql-action%2Fissues%2Fnew%2Fchoose
robertbrignullhttps://github.com/robertbrignull
mainhttps://github.com/github/codeql-action/tree/main
upload_clihttps://github.com/github/codeql-action/tree/upload_cli
Conversation 32 https://github.com/github/codeql-action/pull/147
Findings https://github.com/github/codeql-action/pull/147/findings
Commits 7 https://github.com/github/codeql-action/pull/147/commits
Checks 0 https://github.com/github/codeql-action/pull/147/checks
Files changed https://github.com/github/codeql-action/pull/147/files
Please reload this pagehttps://github.com/github/codeql-action/pull/147/files
Add a CLI interface to the upload-sarif action https://github.com/github/codeql-action/pull/147/files#top
Show all changes 7 commits https://github.com/github/codeql-action/pull/147/files
6d7a135 Add a CLI interface to the upload-sarif action robertbrignull Aug 11, 2020 https://github.com/github/codeql-action/pull/147/commits/6d7a135feaa07851262f55294bc4629a3ca9c7ea
34b3722 commit node_modules and generated files robertbrignull Aug 11, 2020 https://github.com/github/codeql-action/pull/147/commits/34b372292b3222d22a030e6141d632f814c8f333
cf08f5a remove unused arguments robertbrignull Aug 11, 2020 https://github.com/github/codeql-action/pull/147/commits/cf08f5a9cdc9ca91380c7a7c6da97ad29f536541
5b0aafa address comments robertbrignull Aug 12, 2020 https://github.com/github/codeql-action/pull/147/commits/5b0aafadb1a4819f3049c2514ceab37b436df6a6
150e07f add test action robertbrignull Aug 12, 2020 https://github.com/github/codeql-action/pull/147/commits/150e07f914bdb5c1afd65b7e40d8d10489ee42a0
4b56177 Re-throw errors robertbrignull Aug 12, 2020 https://github.com/github/codeql-action/pull/147/commits/4b56177c28f30b0f17a32c835e5a267c90df72b2
2828c43 fix file location robertbrignull Aug 12, 2020 https://github.com/github/codeql-action/pull/147/commits/2828c43ac7648dd83570ee19a76b4da755ee42a8
Clear filters https://github.com/github/codeql-action/pull/147/files
Please reload this pagehttps://github.com/github/codeql-action/pull/147/files
Please reload this pagehttps://github.com/github/codeql-action/pull/147/files
https://github.com/github/codeql-action/blob/main/CODEOWNERS#L1
.github/workflows/cli.ymlhttps://github.com/github/codeql-action/pull/147/files#diff-302cf6f60da3e4f2ef11792a8bcf7b39c384c4c0e4e065b575e0aaf7d5fa5c79
View file https://github.com/github/codeql-action/blob/2828c43ac7648dd83570ee19a76b4da755ee42a8/.github/workflows/cli.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql-action/pull/147/{{ revealButtonHref }}
https://github.com/github/codeql-action/blob/main/CODEOWNERS#L1
.gitignorehttps://github.com/github/codeql-action/pull/147/files#diff-bc37d034bad564583790a46f19d807abfe519c5671395fd494d8cce506c42947
View file https://github.com/github/codeql-action/blob/2828c43ac7648dd83570ee19a76b4da755ee42a8/.gitignore
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql-action/pull/147/{{ revealButtonHref }}
https://github.com/github/codeql-action/blob/main/CODEOWNERS#L1
lib/api-client.jshttps://github.com/github/codeql-action/pull/147/files#diff-94347f352ede0a83973cdf3b2bd4d1499ea5be7b686fce6fdb34891492941a91
View file https://github.com/github/codeql-action/blob/2828c43ac7648dd83570ee19a76b4da755ee42a8/lib/api-client.js
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/github/codeql-action/pull/147/files
https://github.com/github/codeql-action/blob/main/CODEOWNERS#L1
lib/api-client.js.maphttps://github.com/github/codeql-action/pull/147/files#diff-5db6e95c4e914346af3c523274edfeb6b99180d75ed630fa6a4be778b4e0dcba
View file https://github.com/github/codeql-action/blob/2828c43ac7648dd83570ee19a76b4da755ee42a8/lib/api-client.js.map
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/github/codeql-action/pull/147/files
https://github.com/github/codeql-action/blob/main/CODEOWNERS#L1
lib/cli.jshttps://github.com/github/codeql-action/pull/147/files#diff-347ff93ed2b00c93c817863e32fbac5b4fac71d7339a48378980e682777689f4
View file https://github.com/github/codeql-action/blob/2828c43ac7648dd83570ee19a76b4da755ee42a8/lib/cli.js
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/github/codeql-action/pull/147/files
https://github.com/github/codeql-action/blob/main/CODEOWNERS#L1
lib/cli.js.maphttps://github.com/github/codeql-action/pull/147/files#diff-1c9fd060a144e1d76bbf51ef5be1daec033b5be247762e888b7e88b988b1e06c
View file https://github.com/github/codeql-action/blob/2828c43ac7648dd83570ee19a76b4da755ee42a8/lib/cli.js.map
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/github/codeql-action/pull/147/files
https://github.com/github/codeql-action/blob/main/CODEOWNERS#L1
lib/codeql.jshttps://github.com/github/codeql-action/pull/147/files#diff-5bd808ec74194675da6319beb80c228163039f26c9ddf1b8bf3eef9b12c9341b
View file https://github.com/github/codeql-action/blob/2828c43ac7648dd83570ee19a76b4da755ee42a8/lib/codeql.js
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/github/codeql-action/pull/147/files
https://github.com/github/codeql-action/blob/main/CODEOWNERS#L1
lib/codeql.js.maphttps://github.com/github/codeql-action/pull/147/files#diff-325a6cb428a1dafbcfbd43461aa4ae95826c648a3f9a7d7b6e6bf05878152d64
View file https://github.com/github/codeql-action/blob/2828c43ac7648dd83570ee19a76b4da755ee42a8/lib/codeql.js.map
Open in desktop https://desktop.github.com
Please reload this pagehttps://github.com/github/codeql-action/pull/147/files
https://github.com/github/codeql-action/blob/main/CODEOWNERS#L1
lib/config-utils.jshttps://github.com/github/codeql-action/pull/147/files#diff-94bb9198a667c3d0f4c0d027ac5a72ddd64dd8fce51963646a75b15eea8e65bc
View file https://github.com/github/codeql-action/blob/2828c43ac7648dd83570ee19a76b4da755ee42a8/lib/config-utils.js
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/github/codeql-action/pull/147/files
https://github.com/github/codeql-action/blob/main/CODEOWNERS#L1
lib/config-utils.js.maphttps://github.com/github/codeql-action/pull/147/files#diff-7792b77b9c686407181d671ef64aae70524a286ab0b9b39fc34680efa7a16ef8
View file https://github.com/github/codeql-action/blob/2828c43ac7648dd83570ee19a76b4da755ee42a8/lib/config-utils.js.map
Open in desktop https://desktop.github.com
Please reload this pagehttps://github.com/github/codeql-action/pull/147/files
https://github.com/github/codeql-action/blob/main/CODEOWNERS#L1
lib/finalize-db.jshttps://github.com/github/codeql-action/pull/147/files#diff-0718e3e92a103d254d2a24b24d8b8cd75970ae3c8b195ec8e4713d392323222c
View file https://github.com/github/codeql-action/blob/2828c43ac7648dd83570ee19a76b4da755ee42a8/lib/finalize-db.js
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/github/codeql-action/pull/147/files
https://github.com/github/codeql-action/blob/main/CODEOWNERS#L1
lib/finalize-db.js.maphttps://github.com/github/codeql-action/pull/147/files#diff-06c49c3f8e23c5c9bf6fba4b926e5088a3f2b4f48bf74ae64140f7e1822cf683
View file https://github.com/github/codeql-action/blob/2828c43ac7648dd83570ee19a76b4da755ee42a8/lib/finalize-db.js.map
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/github/codeql-action/pull/147/files
https://github.com/github/codeql-action/blob/main/CODEOWNERS#L1
lib/logging.jshttps://github.com/github/codeql-action/pull/147/files#diff-aebd214313c52c01cbb2d1e66c9f8390016a3997f002d1507039f5e48ff1f6e6
View file https://github.com/github/codeql-action/blob/2828c43ac7648dd83570ee19a76b4da755ee42a8/lib/logging.js
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/github/codeql-action/pull/147/files
Please reload this pagehttps://github.com/github/codeql-action/pull/147/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.