
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@cyclonedx/cyclonedx-library
Advanced tools
Core functionality of CycloneDX for JavaScript (Node.js or WebBrowser).
Core functionality of CycloneDX for JavaScript (Node.js or WebBrowsers), written in TypeScript and compiled for the target.
AttachmentEncoding
ComponentScope
ComponentType
ExternalReferenceType
HashAlgorithm
Vulnerability
related:
AffectStatus
AnalysisJustification
AnalysisResponse
AnalysisState
RatingMethod
Severity
Attachment
Bom
BomLink
, BomLinkDocument
, BomLinkElement
BomRef
, BomRefRepository
Component
, ComponentRepository
, ComponentEvidence
ExternalReference
, ExternalReferenceRepository
Hash
, HashContent
, HashDictionary
LicenseExpression
, NamedLicense
, SpdxLicense
, LicenseRepository
Metadata
OrganizationalContact
, OrganizationalContactRepository
OrganizationalEntity
, OrganizationalEntityRepository
Property
, PropertyRepository
SWID
Tool
, ToolRepository
, Tools
Vulnerability
related:
Advisory
, AdvisoryRepository
Affect
, AffectRepository
, AffectedSingleVersion
, AffectedVersionRange
, AffectedVersionRepository
Analysis
Credits
Rating
, RatingRepository
Reference
, ReferenceRepository
Source
Vulnerability
, VulnerabilityRepository
Bom.serialNumber
PackageURL
from Component
data modelsTool
or Component
from PackageJson-like data structures1.6
1.5
1.4
1.3
1.2
Bom
data models to JSON stringBom
data models to XML string:
This package and the build results are available for npm, pnpm and yarn:
npm i -S @cyclonedx/cyclonedx-library
pnpm add @cyclonedx/cyclonedx-library
yarn add @cyclonedx/cyclonedx-library
You can install the package from source, which will build automatically on installation:
npm i -S github:CycloneDX/cyclonedx-javascript-library
pnpm add github:CycloneDX/cyclonedx-javascript-library
yarn add @cyclonedx/cyclonedx-library@github:CycloneDX/cyclonedx-javascript-library # only with yarn-2
Some dependencies are optional.
See the shipped package.json
for version constraints.
See extended examples.
const CDX = require('@cyclonedx/cyclonedx-library')
const bom = new CDX.Models.Bom()
bom.metadata.component = new CDX.Models.Component(
CDX.Enums.ComponentType.Application,
'MyProject'
)
const componentA = new CDX.Models.Component(
CDX.Enums.ComponentType.Library,
'myComponentA',
)
bom.components.add(componentA)
bom.metadata.component.dependencies.add(componentA.bomRef)
<script src="path-to-this-package/dist.web/lib.js"></script>
<script type="application/javascript">
const CDX = CycloneDX_library
let bom = new CDX.Models.Bom()
bom.metadata.component = new CDX.Models.Component(
CDX.Enums.ComponentType.Application,
'MyProject'
)
const componentA = new CDX.Models.Component(
CDX.Enums.ComponentType.Library,
'myComponentA',
)
bom.components.add(componentA)
bom.metadata.component.dependencies.add(componentA.bomRef)
</script>
We ship annotated type definitions, so that your IDE and tools may pick up the documentation when you use this library downstream.
There are also pre-rendered documentations hosted on readthedocs.
Feel free to open issues, bug reports or pull requests.
See the CONTRIBUTING file for details.
Permission to modify and redistribute is granted under the terms of the Apache 2.0 license.
See the LICENSE file for the full license.
7.1.0 -- 2025-01-09
Models.Copyright
and class Models.CopyrightRepository
(via [#1202])Models.AttachmentContent
(via [#1202])Stringable
& SortableStringables
with public API ([#1192] via [#1202])npm11
([#1191] via [#1203])FAQs
Core functionality of CycloneDX for JavaScript (Node.js or WebBrowser).
We found that @cyclonedx/cyclonedx-library demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.