Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: license update, prodsec/security_scans added #4

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.1

orbs:
win: circleci/windows@2.4.0
prodsec: snyk/prodsec-orb@1.0
prodsec: snyk/prodsec-orb@1

filters_branches_ignore_main: &filters_branches_ignore_main
filters:
Expand Down Expand Up @@ -61,6 +61,16 @@ commands:
command: npm --version

jobs:
security-scans:
<<: *defaults
resource_class: small
docker:
- image: cimg/node:<< parameters.node_version >>
steps:
- checkout
- install_deps
- prodsec/security_scans:
mode: auto
lint:
<<: *defaults
docker:
Expand Down Expand Up @@ -108,6 +118,11 @@ workflows:
context:
- snyk-bot-slack
channel: os-team-managed-alerts
- security-scans:
name: Perform security scans for PRs
context:
- open_source-managed
<<: *filters_branches_ignore_main
- lint:
name: Lint
context: nodejs-install
Expand All @@ -131,5 +146,4 @@ workflows:
context: nodejs-install
requires:
- Lint
<<: *filters_branches_ignore_main

<<: *filters_branches_ignore_main
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2018 Snyk Ltd.
Copyright 2024 Snyk Ltd.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
3 changes: 2 additions & 1 deletion lib/npm-modules-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ import * as baseDebug from 'debug';
import { isEmpty } from 'lodash';
import { Options } from './types';
import { getFileContents } from './utils';
import { PkgTree } from 'snyk-nodejs-lockfile-parser';

const debug = baseDebug('snyk-nodejs-plugin');

export async function parse(
root: string,
targetFile: string,
options: Options,
): Promise<resolveNodeDeps.PackageExpanded> {
): Promise<PkgTree> {
if (targetFile.endsWith('yarn.lock')) {
options.file =
options.file && options.file.replace('yarn.lock', 'package.json');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"lodash.sortby": "^4.7.0",
"micromatch": "4.0.2",
"snyk-nodejs-lockfile-parser": "1.52.11",
"snyk-resolve-deps": "4.7.3"
"snyk-resolve-deps": "4.8.0"
},
"devDependencies": {
"@types/jest": "^29.5.3",
Expand Down