Coder Social home page Coder Social logo

jahilldev / audit-teamcity-report Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 297 KB

Simple CLI that loads local project dependencies and outputs an NPM audit in TeamCity service message format.

JavaScript 8.03% TypeScript 91.97%
npm-audit teamcity cli reporter yarn-audit typescript nodejs npm yarn tooling

audit-teamcity-report's Introduction

audit-teamcity-report is a simple CLI and library that prints out an NPM package audit in TeamCity service message format. Useful for running security audits in CI/CD, and monitoring changes.

This package calls the NPM restful API directly to gather security vulnerability data and suggestions. This makes it faster than running npm audit and then using the output to generate readable TeamCity service messages.

Getting Started

Install with Yarn:

$ yarn add --dev audit-teamcity-report

Install with NPM:

$ npm i --save-dev audit-teamcity-report

Demo

When the audit identifies vulnerabilities for your packages, a new tab for that build labeled "Code Inspection" will appear. You'll get a list of all packages that require an update, with a description and link to the advisory.

alt text

Useage

The package can be used in two ways, via the CLI or by consuming the exported functions. audit-teamcity-report will, by default, load your package.json file from the current working directory. It'll then check for a package-lock.json file, if this isn't found, it will try and load a yarn.lock file. If neither lock files are found, it'll run an audit on your top level dependencies only.

If you'd like to only report on packages installed directly into your project (top level), you can use the topLevelOnly argument to do so.

CLI

$ audit-teamcity-report

Node

import { readDependencies, auditService, outputReport } from 'audit-teamcity-report';

/*[...]*/

const project = await readDependencies({ topLevelOnly: false });
const result = await auditService(project);

// optional
outputReport(result);

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.