This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AWS = require('aws-sdk'); | |
import minimist = require('minimist'); | |
const args: any = minimist(process.argv); | |
const secretsManager = new AWS.SecretsManager({ | |
region: process.env.AWS_DEFAULT_REGION || 'us-east-2', | |
}); | |
export class SecretByKey { | |
public getSecretByKey(secretId: string, keys: string[]): Promise<any> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { spawnSync } from 'child_process'; | |
const child = spawnSync('git', ['log', '-1', '--pretty=format:%s']); | |
if (child.error) { | |
// tslint:disable-next-line: no-console | |
console.error(null); | |
process.exit(1); | |
} | |
// tslint:disable-next-line: no-console | |
console.log( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AWS = require('aws-sdk'); | |
import fs = require('fs'); | |
import minimist = require('minimist'); | |
const args: any = minimist(process.argv); | |
const apigateway = new AWS.APIGateway({ | |
region: process.env.AWS_DEFAULT_REGION || 'us-east-2', | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from 'fs'; | |
import * as _ from 'lodash'; | |
import { RequestAPI, RequiredUriUrl } from 'request'; | |
import * as request from 'request-promise-native'; | |
export class YarnAudit { | |
private client: RequestAPI< | |
request.RequestPromise, | |
request.RequestPromiseOptions, | |
RequiredUriUrl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from 'fs'; | |
import * as _ from 'lodash'; | |
import { RequestAPI, RequiredUriUrl } from 'request'; | |
import * as request from 'request-promise-native'; | |
export class SnykDockerAudit { | |
private client: RequestAPI< | |
request.RequestPromise, | |
request.RequestPromiseOptions, | |
RequiredUriUrl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios'); | |
const AWS = require('aws-sdk'); | |
const FunctionShield = require('@puresec/function-shield'); | |
const ENV = process.env; | |
const slackInfraAlertBot = 'your slack bot token'; | |
FunctionShield.configure( | |
{ | |
policy: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const https = require('https'); | |
const zlib = require('zlib'); | |
const crypto = require('crypto'); | |
const FunctionShield = require('@puresec/function-shield'); | |
const ENV = process.env; | |
const endpoint = ENV.es_endpoint; | |
FunctionShield.configure( | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn audit --json > yarn_audit.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type":"auditAdvisory", | |
"data":{ | |
"resolution":{ | |
"id":1091144, | |
"path":"swagger-ui>@braintree/sanitize-url", | |
"dev":false, | |
"optional":false, | |
"bundled":false | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type":"auditSummary", | |
"data":{ | |
"vulnerabilities":{ | |
"info":0, | |
"low":19, | |
"moderate":92, | |
"high":121, | |
"critical":28 | |
}, |