atomshields.checkers package


atomshields.checkers.base module

class atomshields.checkers.base.GenericChecker[source]

Bases: object


Getter for ‘dao’ property

Returns:Instance of DAO class
Return type:atomshield.helpers.DAO

Getter for ‘path’ property

Returns:Absolute path to scan
Return type:str

Getter for ‘project’ property

Returns:Project’s name
Return type:str

Getter for ‘issues’ property

Returns:List of instances of Issue class
Return type:list<atomshields.helpers.Issue>

Getter for ‘config’ property

Returns:Dictionary which contains the current values for this report config
Return type:dict

Check if the checker is OK to run.

This method should to run every test (requirements) in order to ensure the excution will not have errors.

Returns:True if the checker has all the requirements installed. False else
Return type:bool

Abstract method. This method will be executed for subclass which not implemented his own method


Stores an issue in ‘issues’ property

Parameters:issue (atomshields.helpers.Issue) – Issue instance
classmethod parseConfig(value)[source]

Parse the config values

Parameters:value (dict) – Dictionary which contains the checker config
Returns:The checker config with parsed values
Return type:dict
static isInstalled()[source]

Check if a software is installed into machine.

Parameters:value (str) – Software’s name
Returns:True if the software is installed. False else
Return type:bool

Decorator for method run. This method will be execute before the execution from the method with this decorator.

atomshields.checkers.dsstore module

class atomshields.checkers.dsstore.DSStoreChecker[source]

Bases: atomshields.checkers.base.GenericChecker

NAME = 'dsstore'
DESCRIPTION = 'Busca y elimina los ficheros .DS_Store'
CONFIG = {'enabled': True, 'exclude_paths': [], 'remove': True}
run(*args, **kwargs)

atomshields.checkers.retirejs module

class atomshields.checkers.retirejs.RetireJSChecker[source]

Bases: atomshields.checkers.base.GenericChecker

NAME = 'retirejs'
DESCRIPTION = 'Detecta ficheros JavaScript vulnerables'
CONFIG = {'enabled': True, 'exclude_paths': ['test/']}
run(*args, **kwargs)
scan(path, options='', tempfile=False)[source]
download(url, path)[source]
static install()[source]

Install all the dependences


Check the dependences.

Returns:True if all dependences are installed. False else.
Return type:bool

atomshields.checkers.targetblank module

class atomshields.checkers.targetblank.TargetBlankChecker[source]

Bases: atomshields.checkers.base.GenericChecker

NAME = 'targetblank'
DESCRIPTION = "Detecta vulnerabilidades 'Target Blank' en ficheros HTML"
CONFIG = {'enabled': True, 'exclude_paths': ['/test/', '/docs/']}
REGEX = u'(<a (?=.*href=([\'\\"])(https?:)?\\/\\/.*?\\2)(?!.*rel=([\'\\"])(.*\\bnoopener\\b.*\\bnoreferrer\\b.*|.*\\bnoreferrer\\b.*\\bnoopener\\b.*)\\4)[^>]*target=([\'\\"]?)_blank\\6[^>]*)(>)([^<]*)(<\\/a>)?'
run(*args, **kwargs)

Module contents