Installations
npm install picluster-getos
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
8.2.1
NPM Version
5.3.0
Score
63.5
Supply Chain
92
Quality
75
Maintenance
50
Vulnerability
99.6
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
2,097
Last day
0%
1
Compared to previous day
Last week
0%
2
Compared to previous week
Last month
250%
7
Compared to previous month
Last year
-32.4%
46
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
getos
Get the OS/Distribution name of the environment you are working on
Problem
os.platform()
returns linux
. If you want the distrubtion name, you're out of luck.
Solution
This. Simply call:
1var getos = require('getos') 2 3getos(function(e,os) { 4 if(e) return console.log(e) 5 console.log("Your OS is:" +JSON.stringify(os)) 6})
The os
object conforms to:
1{ 2 os: [OS NAME], 3 dist:[DIST NAME], 4 codename:[CODENAME], 5 release:[VERSION] 6}
For example:
1{ 2 os: "linux", 3 dist: "Ubuntu Linux", 4 codename: "precise", 5 release: "12.04" 6}
Disclaimer
Check os.json
in this repo. Any distribution that shares a common resource file with another distrubtion is currently untested. These are the arrays of distrubitons with more than 1 member. If you are using one of these distrubtions, please submit an issue letting me know if it works. If it fails, please post the content of the file.
If you have a distrubtion not in os.json
, please identify your resource file and submit it's name and content along with your distrbution/version in an issue.
Thanks for helping make this tool great.
Unit Tests
Unit tests stub out the behaviour of the OS files and libraries we depend on to ensure the behaviour of the application is sound. You can run these simply by running npm test
Authors and Contributors
getos has been made possible by these fantastic contributors:
Benjamin E. Coe | GitHub/bcoe | Twitter/@benjamincoe |
---|---|---|
Eugene Sharygin | GitHub/eush77 | Twitter/@eush77 |
David Routhieau | GitHub/root-io | unknown |
Lawrence | GitHub/mindmelting | Twitter/@mindmelting |
Roman Jurkov | GitHub/winfinit | Twitter/@winfinit |
Rod Vagg | GitHub/rvagg | Twitter/@rvagg |
Zeke Sikelianos | GitHub/zeke | Twitter/@zeke |
Alexander | GitHub/alex4Zero | Twitter/@alex4Zero |
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating debian:7.4 to debian:7.4@sha256:c0a108aed0b5eb62177ef81a1e0473192f1c451ff710acde3360e400b11bcbc1
- Warn: containerImage not pinned by hash: tests/alpine/3.3/Dockerfile:1: pin your Docker image by updating alpine:3.3 to alpine:3.3@sha256:6bff6f65597a69246f79233ef37ff0dc50d97eaecbabbe4f8a885bf358be1ecf
- Warn: containerImage not pinned by hash: tests/debian/7.3/Dockerfile:1: pin your Docker image by updating debian:7.3 to debian:7.3@sha256:70b85ddb5a82bf1a1b3e9938747788602b85e2c7ba1713da5ac9997744be7c58
- Warn: containerImage not pinned by hash: tests/debian/7.4/Dockerfile:1: pin your Docker image by updating debian:7.4 to debian:7.4@sha256:c0a108aed0b5eb62177ef81a1e0473192f1c451ff710acde3360e400b11bcbc1
- Warn: containerImage not pinned by hash: tests/debian/7.5/Dockerfile:1: pin your Docker image by updating debian:7.5 to debian:7.5@sha256:129cf957db7007eb63d722bfc155db30c6407569f4cb6f074d34b0e400f93776
- Warn: containerImage not pinned by hash: tests/debian/7.6/Dockerfile:1: pin your Docker image by updating debian:7.6 to debian:7.6@sha256:ca8972735c90554dd049cde1cb839c9462cb2d80ff8655a4b7a3294d579f5407
- Warn: containerImage not pinned by hash: tests/fedora/20/Dockerfile:1: pin your Docker image by updating fedora:20 to fedora:20@sha256:5d5a02b873d298da9bca4b84440c5cd698b0832560c850d92cf389cef58bc549
- Warn: containerImage not pinned by hash: tests/ubuntu/13.10/Dockerfile:1: pin your Docker image by updating ubuntu:13.10 to ubuntu:13.10@sha256:403105e61e2d540187da20d837b6a6e92efc3eb4337da9c04c191fb5e28c44dc
- Warn: containerImage not pinned by hash: tests/ubuntu/14.04/Dockerfile:1: pin your Docker image by updating ubuntu:14.04 to ubuntu:14.04@sha256:64483f3496c1373bfd55348e88694d1c4d0c9b660dee6bfef5e12f43b9933b30
- Warn: downloadThenRun not pinned by hash: Dockerfile:13
- Warn: downloadThenRun not pinned by hash: tests/debian/7.3/Dockerfile:13
- Warn: downloadThenRun not pinned by hash: tests/debian/7.4/Dockerfile:13
- Warn: downloadThenRun not pinned by hash: tests/debian/7.5/Dockerfile:13
- Warn: downloadThenRun not pinned by hash: tests/debian/7.6/Dockerfile:13
- Warn: downloadThenRun not pinned by hash: tests/ubuntu/13.10/Dockerfile:11
- Warn: downloadThenRun not pinned by hash: tests/ubuntu/14.04/Dockerfile:11
- Info: 0 out of 9 containerImage dependencies pinned
- Info: 0 out of 7 downloadThenRun dependencies pinned
Score
2.8
/10
Last Scanned on 2025-01-27
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