feat(library): ignore files under vendor dir (fanal#44)

This commit is contained in:
Teppei Fukuda
2019-10-31 12:25:12 +02:00
committed by GitHub
parent 9e8f0bb4f0
commit cf9d00dfc2
8 changed files with 32 additions and 22 deletions

View File

@@ -3,7 +3,6 @@ package composer
import (
"bytes"
"path/filepath"
"strings"
"github.com/aquasecurity/fanal/analyzer"
"github.com/aquasecurity/fanal/extractor"
@@ -29,11 +28,6 @@ func (a composerLibraryAnalyzer) Analyze(fileMap extractor.FileMap) (map[analyze
continue
}
// skip analyze files which in dependency folder
if utils.StringInSlice(utils.COMPOSER_DEP_DIR, strings.Split(filename, utils.PathSeparator)) {
continue
}
r := bytes.NewBuffer(content)
libs, err := composer.Parse(r)
if err != nil {