KustomizeScanner

class neophile.scanner.kustomize.KustomizeScanner(root: pathlib.Path)

Bases: neophile.scanner.base.BaseScanner

Scan a source tree for Kustomize version references.

This recognizes external resources in the formats:

github.com/<owner>/<repo>(.git)?//<path>?ref=<version>
https://github.com/<owner>/<repo>/<path>?ref=<version>
Parameters:root (pathlib.Path) – The root of the source tree.

Attributes Summary

RESOURCE_REGEXES The regexes to match external resources and extract data from them.

Methods Summary

name() The name of the scanner type.
scan() Scan a source tree for version references.

Attributes Documentation

RESOURCE_REGEXES = [re.compile('github\\.com/([^/]+)/([^/.]+).*?ref=(.*)'), re.compile('https://github\\.com/([^/]+)/([^/.]+).*?ref=(.*)')]

The regexes to match external resources and extract data from them.

The first match group will be the repository owner, the second match group will be the repository name, and the third match group will be the tag.

Methods Documentation

name() → str

The name of the scanner type.

Returns:name – A string representing the type of scanner this is. Used for reporting results accumulated from a bunch of scanners.
Return type:str
scan() → List[KustomizeDependency]

Scan a source tree for version references.

Returns:results – A list of all discovered dependencies.
Return type:List[neophile.dependency.kustomize.KustomizeDependency]