PyCIRCLean/.travis.yml

85 lines
2.5 KiB
YAML

language: python
python:
- 3.6
- "3.6-dev"
- "3.7-dev"
# - nightly
sudo: required
# https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments
dist: bionic
addons:
apt:
packages:
# General dependencies
- p7zip-full
# Testing dependencies
- mercurial
install:
# General dependencies
- sudo apt-get update -qq
- sudo apt-get install -y p7zip-rar
# filecheck.py dependencies
- sudo apt-get install libxml2-dev libxslt1-dev
- wget https://didierstevens.com/files/software/pdfid_v0_2_5.zip
- unzip pdfid_v0_2_5.zip
- pip install -U pip pipenv
# PyCIRCLean dependencies
- pipenv install -d
# Testing dependencies
- sudo apt-get install rar
# Prepare tests
# Malware from theZoo
- git clone https://github.com/Rafiot/theZoo.git
- pushd theZoo/malwares/Binaries
- python unpackall.py
- popd
- mkdir tests/uncategorized/the_zoo/
- mv theZoo/malwares/Binaries/out tests/uncategorized/the_zoo/
# Path traversal attacks
- git clone https://github.com/jwilk/path-traversal-samples
- pushd path-traversal-samples
- pushd zip
- make
- popd
- pushd rar
- make
- popd
- popd
- mkdir tests/uncategorized/path_traversal_zip/
- mkdir tests/uncategorized/path_traversal_rar/
- mv path-traversal-samples/zip/*.zip tests/uncategorized/path_traversal_zip
- mv path-traversal-samples/rar/*.rar tests/uncategorized/path_traversal_rar
# Office docs
- git clone https://github.com/eea/odfpy.git
- mkdir tests/uncategorized/odfpy/
- mv odfpy/tests/examples/* tests/uncategorized/odfpy/
- mkdir tests/uncategorized/olefile
- pushd tests/uncategorized/olefile
- wget https://bitbucket.org/decalage/olefileio_pl/raw/3073963b640935134ed0da34906fea8e506460be/Tests/images/test-ole-file.doc
- popd
- mkdir tests/uncategorized/fraunhofer && pushd tests/uncategorized/fraunhofer
- wget --no-check-certificate https://www.officedissector.com/corpus/fraunhoferlibrary.zip
- unzip -o fraunhoferlibrary.zip
- rm fraunhoferlibrary.zip
- popd
# Turned off unzipping 42.zip because it isn't included in the file catalog and archivebomb.zip ends up testing the same thing
# - pushd tests/dangerous/
# - 7z x -p42 42.zip
# - popd
script:
- travis_wait 60 pipenv run py.test --cov=kittengroomer --cov=filecheck tests/
notifications:
email:
on_success: change
on_failure: change
after_success:
- codecov