Gathering detailed insights and metrics for keytar
Gathering detailed insights and metrics for keytar
Gathering detailed insights and metrics for keytar
Gathering detailed insights and metrics for keytar
npm install keytar
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
1,371 Stars
502 Commits
193 Forks
28 Watching
10 Branches
51 Contributors
Updated on 15 Oct 2024
C++ (72.13%)
JavaScript (16.42%)
Python (4.18%)
Dockerfile (3.79%)
PowerShell (2.92%)
Shell (0.55%)
Cumulative downloads
Total Downloads
Last day
-6.1%
104,447
Compared to previous day
Last week
-1%
562,486
Compared to previous week
Last month
11.3%
2,389,977
Compared to previous month
Last year
0.5%
24,865,376
Compared to previous year
2
A native Node module to get, add, replace, and delete passwords in system's keychain. On macOS the passwords are managed by the Keychain, on Linux they are managed by the Secret Service API/libsecret, and on Windows they are managed by Credential Vault.
1npm install keytar
Currently this library uses libsecret
so you may need to install it before running npm install
.
Depending on your distribution, you will need to run the following command:
sudo apt-get install libsecret-1-dev
sudo yum install libsecret-devel
sudo pacman -S libsecret
npm install
npm test
to run the testsEach release of keytar
includes prebuilt binaries for the versions of Node and Electron that are actively supported by these projects. Please refer to the release documentation for Node and Electron to see what is supported currently.
1const keytar = require('keytar')
Every function in keytar is asynchronous and returns a promise. The promise will be rejected with any error that occurs or will be resolved with the function's "yields" value.
Get the stored password for the service
and account
.
service
- The string service name.
account
- The string account name.
Yields the string password or null
if an entry for the given service and account was not found.
Save the password
for the service
and account
to the keychain. Adds a new entry if necessary, or updates an existing entry if one exists.
service
- The string service name.
account
- The string account name.
password
- The string password.
Yields nothing.
Delete the stored password for the service
and account
.
service
- The string service name.
account
- The string account name.
Yields true
if a password was deleted, or false
if an entry with the given service and account was not found.
Find all accounts and password for the service
in the keychain.
service
- The string service name.
Yields an array of { account: 'foo', password: 'bar' }
.
Find a password for the service
in the keychain. This is ideal for scenarios where an account
is not required.
service
- The string service name.
Yields the string password, or null
if an entry for the given service was not found.
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
SAST tool detected but not run on all commits
Details
Reason
project is archived
Details
Reason
detected GitHub workflow tokens with excessive permissions
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
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
Project has not signed or included provenance with any releases.
Details
Reason
16 existing vulnerabilities detected
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@hackolade/keytar-darwin-x64
Node Prebuild for @hackolade/keytar-darwin-x64
@hackolade/keytar-win32-x64
Node Prebuild for @hackolade/keytar-win32-x64
@hackolade/keytar-darwin-arm64
Node Prebuild for @hackolade/keytar-darwin-arm64
@hackolade/keytar-linux-x64
Node Prebuild for @hackolade/keytar-linux-x64