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

bug: don't follow symlinks in archives (#1475) #1486

Merged
merged 32 commits into from
Dec 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
771960a
Merge pull request #1 from intel/master
anthonyharrison May 27, 2020
20d6262
Merge remote-tracking branch 'upstream/master'
anthonyharrison Jun 1, 2020
5ab2c87
Merge remote-tracking branch 'upstream/master'
anthonyharrison Jul 18, 2020
ea57d05
Merge remote-tracking branch 'upstream/master'
anthonyharrison Aug 20, 2020
c2a8d1c
Merge remote-tracking branch 'upstream/master'
anthonyharrison Sep 1, 2020
7035ae9
Merge remote-tracking branch 'upstream/master'
anthonyharrison Sep 2, 2020
aaba9eb
Merge remote-tracking branch 'upstream/master'
anthonyharrison Sep 18, 2020
3b91b0e
Merge remote-tracking branch 'upstream/master'
anthonyharrison Oct 18, 2020
13fa1a8
Merge remote-tracking branch 'upstream/master'
anthonyharrison Nov 8, 2020
5db21eb
Merge remote-tracking branch 'upstream/master'
anthonyharrison Mar 14, 2021
9418560
Merge branch 'main'
anthonyharrison Mar 14, 2021
0f3f754
Merge branch 'main'
anthonyharrison Mar 24, 2021
9e04dab
Merge remote-tracking branch 'refs/remotes/upstream/main'
anthonyharrison May 30, 2021
da7e34a
Merge branch 'intel:main' into master
anthonyharrison Jun 20, 2021
8c9ea48
Merge branch 'intel:main' into master
anthonyharrison Jun 27, 2021
9581317
Merge branch 'intel:main' into master
anthonyharrison Jul 12, 2021
c59de25
Merge branch 'intel:main' into master
anthonyharrison Jul 25, 2021
bf5908a
Merge branch 'intel:main' into master
anthonyharrison Sep 3, 2021
2505e10
Merge branch 'intel:main' into master
anthonyharrison Sep 23, 2021
589b93d
Merge branch 'intel:main' into master
anthonyharrison Oct 13, 2021
42757cb
Merge branch 'intel:main' into master
anthonyharrison Oct 27, 2021
0f519a3
Merge branch 'intel:main' into master
anthonyharrison Nov 3, 2021
4e9f0e7
chore: update pre-commit config
web-flow Dec 1, 2021
4016283
Merge remote-tracking branch 'upstream/main'
anthonyharrison Dec 5, 2021
cd7b07a
Merge remote-tracking branch 'upstream/main'
anthonyharrison Dec 9, 2021
4197fde
Merge branch 'intel:main' into master
anthonyharrison Dec 12, 2021
6a9494b
Merge branch 'intel:main' into master
anthonyharrison Dec 20, 2021
187f669
Merge branch 'intel:main' into master
anthonyharrison Dec 23, 2021
03d40b2
Merge pull request #3 from anthonyharrison/chore-precommit-config
anthonyharrison Dec 28, 2021
5a9fc91
Merge remote-tracking branch 'upstream/main'
anthonyharrison Dec 28, 2021
38598df
Merge branch 'master' of https://github.com/anthonyharrison/cve-bin-t…
anthonyharrison Dec 28, 2021
076c67c
bug: don't follow symlinks in archives (#1475)
anthonyharrison Dec 28, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
repos:
- repo: https://github.com/pycqa/isort
rev: 5.9.3
rev: 5.10.1
hooks:
- id: isort

- repo: https://github.com/python/black
rev: 21.9b0
rev: 21.11b1
hooks:
- id: black

- repo: https://github.com/asottile/pyupgrade
rev: v2.29.0
rev: v2.29.1
hooks:
- id: pyupgrade
args: ["--py36-plus"]
Expand Down
3 changes: 3 additions & 0 deletions cve_bin_tool/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ def __init__(self, logger=None, error_mode=ErrorMode.TruncTrace):

def can_extract(self, filename):
"""Check if the filename is something we know how to extract"""
# Do not try to extract symlinks
if os.path.islink(filename):
return False
for extension in itertools.chain(*self.file_extractors.values()):
if filename.endswith(extension):
return True
Expand Down
6 changes: 3 additions & 3 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
black==21.9b0
isort==5.9.3
pre-commit==2.15.0
black==21.11b1
isort==5.10.1
pre-commit==2.16.0
flake8==4.0.1