Skip to content

Package to check if private repository libraries have a public doppelgaenger with the same name. The goal is to prevent a dependency confusion attack on the PyPi ecosystem.

Notifications You must be signed in to change notification settings

rcmckee/pvpcheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pvpCHECK

Purpose

Created to check if private repository libraries have a matching public pypi index library name.

Designed to prevent a dependency confusion attack on the PyPi ecosystem.

Example of attacks:

image

image

Exampe usage:

  1. Install
pip install pvpcheck
  1. Mark private repository libraries before lines containing the import statements and after lines containing the import statements.

image

In a requirements.txt file

# check-private-packages-below-for-public-doppelgaenger
os
pandas
example-private-repository-name
# end-of-private-packages

In a file_name.py file

import os
import pandas
# check-private-packages-below-for-public-doppelgaenger
import example-private-repository-name
# end-of-private-packages
  1. Run from the command line and provide the path to the file.
% pvpcheck -r requirements.txt 

If public libraries are found that match your private repository library you will get a response like:

WARNING: doppelgaengers found for the following library: pandas

Note: the term doppelgaenger means a biologically unrelated look-alike, or a double, of a living person. I use it here to mean a matching public library that is unrelated to your private library.

About

Package to check if private repository libraries have a public doppelgaenger with the same name. The goal is to prevent a dependency confusion attack on the PyPi ecosystem.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages