diff --git a/.ci/deps.sh b/.ci/deps.sh index 4510424baa..c24ef50380 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 933e6ea17f..9c2ce27ee9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,6 +43,7 @@ addons: - opam - php-codesniffer - verilator + - mp3check cache: pip: true diff --git a/bear-requirements.txt b/bear-requirements.txt index 99735b093d..e3f88b51a6 100644 --- a/bear-requirements.txt +++ b/bear-requirements.txt @@ -31,3 +31,4 @@ vim-vint~=0.3.10 vulture~=0.10.0 yamllint~=1.6.1 yapf~=0.14.0 +mp3check~=0.8.3-2 diff --git a/bears/mp3/MP3CheckBear.py b/bears/mp3/MP3CheckBear.py new file mode 100644 index 0000000000..5de13bf43e --- /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='mp3chek', + output_format='regex', + output_regex=r'L(?P\d+)C(?P\d+): (?P.*)') +class MP3CheckBear: + """ + Report possible security weaknesses for MP3 files. + For more information, + consult . + """ + + 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): + pass