Gathering detailed insights and metrics for google-artifactregistry-auth
Gathering detailed insights and metrics for google-artifactregistry-auth
Gathering detailed insights and metrics for google-artifactregistry-auth
Gathering detailed insights and metrics for google-artifactregistry-auth
@tkow/bun-google-artifactregistry-auth
google-artifactregistry-auth is an npm module that allows you to configure npm to interact with npm repositories stored in Artifact Registry with bunfig.
@google-cloud/artifact-registry
Artifactregistry client for Node.js
google-auth-library
Google APIs Authentication Client Library for Node.js
gtoken
Node.js Google Authentication Service Account Tokens
npm install google-artifactregistry-auth
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
15 Stars
60 Commits
19 Forks
25 Watching
9 Branches
425 Contributors
Updated on 30 Oct 2024
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
4.5%
65,173
Compared to previous day
Last week
5.3%
319,848
Compared to previous week
Last month
20.9%
1,314,010
Compared to previous month
Last year
97.9%
11,794,128
Compared to previous year
2
This repository contains tools to simplify the process of working with npm packages using Artifact Registry.
The Artifact Registry google-artifactregistry-auth module is an npm package which allows you to configure npm to interact with npm private repositories in Artifact Registry.
For more details, see https://cloud.google.com/artifact-registry/docs/nodejs/authentication
The module automatically searches for credentials from the environment and authenticates to Artifact Registry. It looks for credentials in the following order:
gcloud auth login
.NOTE: This module would update credentials for all Artifact Registry repositories. It would not be suitable if you use multiple account credentials in npmrc file.
To use the module:
Log in
Option 1: log in as a service account:
(1). Using a JSON file that contains a service account key:
`$ export GOOGLE_APPLICATION_CREDENTIALS=[path/to/key.json]`
(2). Or using gcloud:
`$ gcloud auth application-default login`
Option 2: log in as an end user via gcloud:
$ gcloud auth login
Add settings to connect to the repository to .npmrc. Use the output from the following command:
$ gcloud artifacts print-settings npm
registry=https://LOCATION-npm.pkg.dev/PROJECT_ID/REPOSITORY_ID/
//LOCATION-npm.pkg.dev/PROJECT_ID/REPOSITORY_ID/:always-auth=true
Where
PROJECT_ID is the ID of the project.
REPOSITORY_ID is the ID of the repository.
LOCATION is the location of the repository.
Use one of these below options to run the script
Run the module outside of the directory containing the target npmrc file
$ npx google-artifactregistry-auth --repo-config=[./.npmrc] --credential-config=[~/.npmrc]
Include the command in the scripts in package.json
"scripts": {
"artifactregistry-login": "npx google-artifactregistry-auth --repo-config=[./.npmrc] --credential-config=[~/.npmrc]",
}
Where:
--repo-config
is the .npmrc
file with your repository settings. If you don't specify this flag,
the default location is the current directory.--credential-config
is the path to the .npmrc
file where you want to write the access token. The default is your user .npmrc
file.And then run the script
$ npm run artifactregistry-login
npx
should come with npm
5.2+. If npx
is not available:
Install the module from npmjs.com as a dev dependency and include the command in the script
$ npm install google-artifactregistry-auth --save-dev
"scripts": {
"artifactregistry-login": "./node_modules/.bin/artifactregistry-auth --repo-config=[./.npmrc] --credential-config=[~/.npmrc]",
}
Run the script
$ npm run artifactregistry-login
No vulnerabilities found.
Reason
all changesets reviewed
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
3 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 3
Reason
8 existing vulnerabilities detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More