-
-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JWT authentication and authorization #473
base: main
Are you sure you want to change the base?
Conversation
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/tsx@4.7.0 |
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎ To accept the risk, merge this PR and you will not be notified again.
Next stepsWhat's wrong with minified code?This package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code. In many cases minified code is harmless, however minified code can be used to hide a supply chain attack. Consider not shipping minified code on npm. What is new author?A new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package. Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights. What is unstable ownership?A new collaborator has begun publishing package versions. Package stability and security risk may be elevated. Try to reduce the amount of authors you depend on to reduce the risk to malicious actors gaining access to your supply chain. Packages should remove inactive collaborators with publishing rights from packages on npm. What is environment variable access?Package accesses environment variables, which may be a sign of credential stuffing or data theft. Packages should be clear about which environment variables they access, and care should be taken to ensure they only access environment variables they claim to. Take a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with
|
@@ -12,6 +12,7 @@ | |||
> = { | |||
method: 'POST', | |||
url: '/artifacts/events', | |||
authorization: 'read', |
Check failure
Code scanning / CodeQL
Hard-coded credentials Critical
authorization header
@@ -24,6 +24,7 @@ | |||
exposeHeadRoute: false, | |||
url: '/artifacts/:id', | |||
schema: artifactsRouteSchema, | |||
authorization: 'read', |
Check failure
Code scanning / CodeQL
Hard-coded credentials Critical
authorization header
@@ -20,6 +20,7 @@ | |||
url: '/artifacts/status', | |||
schema: statusRouteSchema, | |||
logLevel: 'error', | |||
authorization: 'read', |
Check failure
Code scanning / CodeQL
Hard-coded credentials Critical
authorization header
@@ -23,6 +23,7 @@ | |||
method: 'HEAD', | |||
url: '/artifacts/:id', | |||
schema: artifactsRouteSchema, | |||
authorization: 'read', |
Check failure
Code scanning / CodeQL
Hard-coded credentials Critical
authorization header
@@ -25,6 +25,7 @@ | |||
url: '/artifacts/:id', | |||
method: 'PUT', | |||
schema: artifactsRouteSchema, | |||
authorization: 'write', |
Check failure
Code scanning / CodeQL
Hard-coded credentials Critical
authorization header
method: 'GET', | ||
url: '/v8/artifacts/not-found', | ||
headers: { | ||
authorization: 'wrong token', |
Check failure
Code scanning / CodeQL
Hard-coded credentials Critical test
authorization header
method: 'GET', | ||
url: '/v8/artifacts/not-found', | ||
headers: { | ||
authorization: 'wrong token', |
Check failure
Code scanning / CodeQL
Hard-coded credentials Critical test
authorization header
ceb7372
to
282fa22
Compare
@all-contributors add @lucalas on maintenance |
I've put up a pull request to add @lucalas! 🎉 |
In this PR:
This PR adds authentication via JWTs that are issued by an OIDC server, such as Auth0 or similar.
It also optionally allows scopes in the token to describe read-only access to the cache and reject writes when appropriate scopes are not present on the user's token.
Issues reference:
Checklist:
pnpm lint
locally prior to submission?pnpm build
of your changes locally?pnpm test
of your changes locally?