Code Monkey home page Code Monkey logo

stig-manager-client-modules's Introduction

stig-manager-client-modules

JavaScript modules for STIG Manager clients. This README and other documentation is under construction.

These modules are used by the STIGMan Watcher and the STIG Manager GUI clients to parse STIG checklist data (ReviewParser.js) and to define the tasks (TaskObject.js) that will be required to import that checklist data into a STIG Manager API instance.

The modules are offered here to help keep the STIG Manager clients in sync, and as a resource to developers that may want to build their own STIG Manager clients or have a need to parse checklist data, etc. Please check those client repos and the STIG Manager API documentation for examples of how to use these modules.

Approach

Wherever possible, the objects used in these modules directly match objects defined in the STIG Manager API.

For example, the ApiAsset object defined in these modules is identical to the STIG-Manager API response from a GET request to the /assets/{assetId} endpoint with the stigs projection query parameter. Check the index.d.ts file for the full list of objects and their properties, the inline comments in the modules themselves, and the STIG Manager Api Definition.

Using the modules in Node.js

In the root of a project, open a terminal and execute:

$ npm install @nuwcdivnpt/stig-manager-client-modules

Importing all modules into ESM code

import * as StigmanLib from `stig-manager-client-modules`

const result = StigmanLib.reviewsFromCkl( ... )
const result = StigmanLib.reviewsFromCklb( ... )
const result = StigmanLib.reviewsFromXccdf( ... )

const tasks = new StigmanLib.TaskObject ( ... )

Importing an individual module into ESM code

import { reviewsFromCkl } from `stig-manager-client-modules`
const result = reviewsFromCkl( ... )

Requiring all modules into CJS code

const StigmanLib = require('stig-manager-client-modules')

const result = StigmanLib.reviewsFromCkl( ... )
const result = StigmanLib.reviewsFromCklb( ... )
const result = StigmanLib.reviewsFromXccdf( ... )

const tasks = new StigmanLib.TaskObject ( ... )

Requiring an individual module into CJS code

const { reviewsFromCkl } = require('stig-manager-client-modules')

const result = reviewsFromCkl( ... )

stig-manager-client-modules's People

Contributors

matte22 avatar cd-rite avatar csmig avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.