News for hackers. Stuff that matters.
Re:Ask HN: How do you security-audit external software using... by apples_oranges on Thursday November 04, 2021 @04:15AM (#29104579)
Refactoring into a single file sounds like a bit of a pain, since you have to do it every time the external code gets updated. Also how do you deal with dependencies that come with their own dependencies? Do you avoid them?
Re:Ask HN: How do you security-audit external software using... by davemo on Thursday November 04, 2021 @07:05AM (#29105578)
This may be slightly tangential but I recently discovered ncc[1] from vercel which can take a single node project and compile it and all dependencies to a single file.

As an added benefit it also collapses all contained dependencies license files into a single licenses.txt file too!

- [1] https://github.com/vercel/ncc

Re:Ask HN: How do you security-audit external software using... by TekMol on Thursday November 04, 2021 @05:23AM (#29104979)

    every time the external code gets updated
I do not keep my fork in sync afterwards.

    dependencies that come with
    their own dependencies
Depends on the dependencies. If you give me an example, I can tell you what I would do.
Re:Ask HN: How do you security-audit external software using... by geofft on Thursday November 04, 2021 @11:32AM (#29108447)
This is a fantastic trick! By copying the source code (which is legal) but not declaring the dependencies in a package.json or similar, nobody will ever get on your case for CVEs in dependencies, and you can save so much time and churn by not updating them.
Re:Ask HN: How do you security-audit external software using... by mellavora on Thursday November 04, 2021 @06:06AM (#29105238)
not necessarily. Depends why the external code was updated and if you need the new functionality.

I'm assuming it isn't a security flaw, because ideally you would have fixed that already during your refactor.