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

https://github.com/snyk/snyk/issues/225 #226

Closed
wants to merge 2 commits into from
Closed
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
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"help",
"dist",
"config.default.json",
"unpublished-package-list.txt",
"SECURITY.md",
"README.md",
"Contributor-Agreement.md",
Expand Down Expand Up @@ -103,7 +104,8 @@
],
"assets": [
"config.default.json",
"help/**/*.txt"
"help/**/*.txt",
"unpublished-package-list.txt"
]
},
"snyk": true
Expand Down
1 change: 0 additions & 1 deletion src/cli/commands/unpublished/head.txt

This file was deleted.

16 changes: 13 additions & 3 deletions src/cli/commands/unpublished/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,23 @@ module.exports = function (cwd) {
cwd = process.cwd();
}

var packages = fs.readFileSync(__dirname + '/package-list.txt', 'utf8')
var packages = fs.readFileSync(__dirname
+ '/../../../../unpublished-package-list.txt', 'utf8')
.split('\n').map(function (s) {
return s.trim();
});

var tail = fs.readFileSync(__dirname + '/tail.txt', 'utf8');
var lbl = fs.readFileSync(__dirname + '/head.txt', 'utf8');
const lbl = 'Checking for unpublished packages created by @azer...';
const tail = 'The flagged packages have been unpublished from npm.\n'
+ 'An unpublished package can be republished by anyone, not\n'
+ 'just the original author, including a malicious entity.\n\n'
+ 'Please inspect those packages to ensure they include the\n'
+ 'content you expected.\n\n'
+ 'As the test is currently limited to packages unpublished\n'
+ 'by Azer, you can also compare their content to the\n'
+ 'repositories on Azer\'s GitHub account:\n'
+ 'https://github.com/azer?tab=repositories\n\n'
+ 'To learn more, see:\n';

spinner.sticky();

Expand Down
14 changes: 0 additions & 14 deletions src/cli/commands/unpublished/tail.txt

This file was deleted.