diff --git a/.ci/deps.sh b/.ci/deps.sh index 9a3ce6d0d3..03d94b7776 100644 --- a/.ci/deps.sh +++ b/.ci/deps.sh @@ -13,7 +13,7 @@ esac # apt-get commands export DEBIAN_FRONTEND=noninteractive -deps="libclang1-3.4 indent mono-mcs chktex r-base julia golang-go luarocks verilator cppcheck flawfinder devscripts" +deps="libclang1-3.4 indent mono-mcs chktex r-base julia golang-go luarocks verilator cppcheck flawfinder devscripts mp3check" deps_infer="m4 opam" case $CIRCLE_BUILD_IMAGE in diff --git a/.travis.yml b/.travis.yml index ec8e2b9a95..7e28eb48d8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,6 +43,7 @@ addons: - opam - php-codesniffer - verilator + - mp3check cache: pip: true diff --git a/bears/mp3/MP3CheckBear.py b/bears/mp3/MP3CheckBear.py new file mode 100644 index 0000000000..0d637bafc5 --- /dev/null +++ b/bears/mp3/MP3CheckBear.py @@ -0,0 +1,23 @@ +from coalib.bearlib.abstractions.Linter import linter +from dependency_management.requirements.DistributionRequirement import ( + DistributionRequirement) + + +@linter(executable='mp3check', + output_format='regex', + output_regex=r'(?P.*)') +class MP3CheckBear: + """ + Report possible security weaknesses for MP3 files. + For more information, + consult . + """ + LANGUAGES = {'MP3'} + REQUIREMENTS = {DistributionRequirement(apt_get='mp3check')} + AUTHORS = {'The coala developers'} + AUTHORS_EMAILS = {'coala-devel@googlegroups.com'} + LICENSE = 'AGPL-3.0' + + @staticmethod + def create_arguments(filename, file, config_file): + return ('-ase', filename) diff --git a/bears/mp3/__init__.py b/bears/mp3/__init__.py new file mode 100644 index 0000000000..e69de29bb2