ANSSI-FR/polichombr

View on GitHub

Showing 1,243 of 1,244 total issues

Operator ! used in void context.
Open

        !di.block.list[0].block.from_normal.nil?

This cop checks for operators, variables and literals used in void context.

Example:

# bad

def some_method
  some_num * 10
  do_something
end

Example:

# bad

def some_method(some_var)
  some_var
  do_something
end

Example:

# good

def some_method
  do_something
  some_num * 10
end

Example:

# good

def some_method(some_var)
  do_something
  some_var
end

Avoid more than 3 levels of block nesting.
Open

        @tbComments[xrefCall] = "Instance : #{strArg}" if strArg.to_s != ''

This cop checks for excessive nesting of conditional and looping constructs.

You can configure if blocks are considered using the CountBlocks option. When set to false (the default) blocks are not counted towards the nesting level. Set to true to count blocks as well.

The maximum level of nesting allowed is configurable.

Avoid more than 3 levels of block nesting.
Open

        if strArg.casecmp('{0002DF05-0000-0000-C000-000000000046}') == 0
          strArg += ' (IID_IWebBrowserApp)'
          @tbComments[xrefCall] += ' (IID_IWebBrowserApp)'
          AddTagFunction(basefunc, 'Net_') unless basefunc.nil?
        end

This cop checks for excessive nesting of conditional and looping constructs.

You can configure if blocks are considered using the CountBlocks option. When set to false (the default) blocks are not counted towards the nesting level. Set to true to count blocks as well.

The maximum level of nesting allowed is configurable.

Avoid more than 3 levels of block nesting.
Open

          if dasm.di_at(secAddr + i + pattAddr).block.from_subfuncret.nil? && dasm.di_at(secAddr + i + pattAddr).block.from_normal.nil?
            dasm.function[secAddr + i + pattAddr] = (dasm.function[:default] || dasm.DecodedFunction.new).dup
            dasm.function[secAddr + i + pattAddr].finalized = true
          end

This cop checks for excessive nesting of conditional and looping constructs.

You can configure if blocks are considered using the CountBlocks option. When set to false (the default) blocks are not counted towards the nesting level. Set to true to count blocks as well.

The maximum level of nesting allowed is configurable.

Line is too long. [1128/80]
Open

                  ['AES_inverse_box', ["\x52\x09\x6a\xd5\x30\x36\xa5\x38\xbf\x40\xa3\x9e\x81\xf3\xd7\xfb", "\x7c\xe3\x39\x82\x9b\x2f\xff\x87\x34\x8e\x43\x44\xc4\xde\xe9\xcb", "\x54\x7b\x94\x32\xa6\xc2\x23\x3d\xee\x4c\x95\x0b\x42\xfa\xc3\x4e", "\x08\x2e\xa1\x66\x28\xd9\x24\xb2\x76\x5b\xa2\x49\x6d\x8b\xd1\x25", "\x72\xf8\xf6\x64\x86\x68\x98\x16\xd4\xa4\x5c\xcc\x5d\x65\xb6\x92", "\x6c\x70\x48\x50\xfd\xed\xb9\xda\x5e\x15\x46\x57\xa7\x8d\x9d\x84", "\x90\xd8\xab\x00\x8c\xbc\xd3\x0a\xf7\xe4\x58\x05\xb8\xb3\x45\x06", "\xd0\x2c\x1e\x8f\xca\x3f\x0f\x02\xc1\xaf\xbd\x03\x01\x13\x8a\x6b", "\x3a\x91\x11\x41\x4f\x67\xdc\xea\x97\xf2\xcf\xce\xf0\xb4\xe6\x73", "\x96\xac\x74\x22\xe7\xad\x35\x85\xe2\xf9\x37\xe8\x1c\x75\xdf\x6e", "\x47\xf1\x1a\x71\x1d\x29\xc5\x89\x6f\xb7\x62\x0e\xaa\x18\xbe\x1b", "\xfc\x56\x3e\x4b\xc6\xd2\x79\x20\x9a\xdb\xc0\xfe\x78\xcd\x5a\xf4", "\x1f\xdd\xa8\x33\x88\x07\xc7\x31\xb1\x12\x10\x59\x27\x80\xec\x5f", "\x60\x51\x7f\xa9\x19\xb5\x4a\x0d\x2d\xe5\x7a\x9f\x93\xc9\x9c\xef", "\xa0\xe0\x3b\x4d\xae\x2a\xf5\xb0\xc8\xeb\xbb\x3c\x83\x53\x99\x61", "\x17\x2b\x04\x7e\xba\x77\xd6\x26\xe1\x69\x14\x63\x55\x21\x0c\x7d"]],

Line is too long. [518/80]
Open

                  ['MARS_Sbox', ["\x79\xc4\xd0\x09\xe0\xff\xc8\x28\x39\x6c\xaa\x84\x87\x72\xad\x9d\xe3\x9b\xff\x7d\x61\x83\x26\xd4\xd4\xa1\x6d\xc9\x93\xcc\x74\x79\x2e\x58\xd0\x85\x05\x57\x4b\x2a\x62\x6a\xa1\x1c\x9d\x27\xbd\xc3\xe5\x25\x1f\x0f\x2f\x37\x60\x51\xfb\xc1\x95\xc6\xe4\xf1\x7f\x4d\xf4\x6b\x5f\xae\x46\xee\x72\x0d\x8a\xde\x23\xff\x83\x8e\xcf\xb1\xe2\x02\x49\xf1\x42\x1e\x98\x3e\xb6\x3e\xf5\x8b\xac\xf8\x4b\x7f\x83\x1f\x63\x83\x05\x02\x97\x25\x84\xe7\xaf\x76\xd4\x31\x79\x3a\x50\x64\x84\x4f\xf6\xc3\x64\x5c"]],

Line is too long. [109/80]
Open

                  ['PKCS_md5', ["\x30\x20\x30\x0c\x06\x08\x2a\x86\x48\x86\xf7\x0d\x02\x05\x05\x00\x04\x10"]],

Line is too long. [503/80]
Open

                  ['DES_Sboxes', ["\x0e\x04\x0d\x01\x02\x0f\x0b\x08\x03\x0a\x06\x0c\x05\x09\x00\x07\x00\x0f\x07\x04\x0e\x02\x0d\x01\x0a\x06\x0c\x0b\x09\x05\x03\x08\x04\x01\x0e\x08\x0d\x06\x02\x0b\x0f\x0c\x09\x07\x03\x0a\x05\x00\x0f\x0c\x08\x02\x04\x09\x01\x07\x05\x0b\x03\x0e\x0a\x00\x06\x0d\x0f\x01\x08\x0e\x06\x0b\x03\x04\x09\x07\x02\x0d\x0c\x00\x05\x0a\x03\x0d\x04\x07\x0f\x02\x08\x0e\x0c\x00\x01\x0a\x06\x09\x0b\x05\x00\x0e\x07\x0b\x0a\x04\x0d\x01\x05\x08\x0c\x06\x09\x03\x02\x0f\x0d\x08\x0a\x01"]],

Line is too long. [517/80]
Open

                  ['whirlpool_c3', ["\x78\x18\x28\x18\x18\x78\xd8\xc0\xaf\x23\x65\x23\x23\xaf\x26\x05\xf9\xc6\x57\xc6\xc6\xf9\xb8\x7e\x6f\xe8\x25\xe8\xe8\x6f\xfb\x13\xa1\x87\x94\x87\x87\xa1\xcb\x4c\x62\xb8\xd5\xb8\xb8\x62\x11\xa9\x05\x01\x03\x01\x01\x05\x09\x08\x6e\x4f\xd1\x4f\x4f\x6e\x0d\x42\xee\x36\x5a\x36\x36\xee\x9b\xad\x04\xa6\xf7\xa6\xa6\x04\xff\x59\xbd\xd2\x6b\xd2\xd2\xbd\x0c\xde\x06\xf5\x02\xf5\xf5\x06\x0e\xfb\x80\x79\x8b\x79\x79\x80\x96\xef\xce\x6f\xb1\x6f\x6f\xce\x30\x5f\xef\x91\xae\x91\x91\xef\x6d"]],

Line is too long. [464/80]
Open

                  ['CAST256_t_r', ["\x13\x00\x00\x00\x1b\x00\x00\x00\x03\x00\x00\x00\x0b\x00\x00\x00\x13\x00\x00\x00\x1b\x00\x00\x00\x03\x00\x00\x00\x0b\x00\x00\x00\x13\x00\x00\x00\x1b\x00\x00\x00\x03\x00\x00\x00\x0b\x00\x00\x00\x13\x00\x00\x00\x1b\x00\x00\x00\x03\x00\x00\x00\x0b\x00\x00\x00\x13\x00\x00\x00\x1b\x00\x00\x00\x03\x00\x00\x00\x0b\x00\x00\x00\x13\x00\x00\x00\x1b\x00\x00\x00\x03\x00\x00\x00\x0b\x00\x00\x00\x04\x00\x00\x00\x0c\x00\x00\x00\x14\x00"]],

Line is too long. [164/80]
Open

                  ['WAKE_tt', ["\x3b\x8f\x6a\x72\x5c\x3b\x9a\xe6\xe5\x1f\xc7\xd3\xd2\x73\x3c\xab\xb3\x8e\x3a\x4d\xe8\xd6\x96\x03\x7a\x2f\x4c\x3d\xf3\x7c\xe2\x9e"]],

end at 500, 17 is not aligned with case at 481, 15.
Open

                 end

This cop checks whether the end keywords are aligned properly.

Three modes are supported through the EnforcedStyleAlignWith configuration parameter:

If it's set to keyword (which is the default), the end shall be aligned with the start of the keyword (if, class, etc.).

If it's set to variable the end shall be aligned with the left-hand-side of the variable assignment, if there is one.

If it's set to start_of_line, the end shall be aligned with the start of the line where the matching keyword appears.

Example: EnforcedStyleAlignWith: keyword (default)

# bad

variable = if true
    end

# good

variable = if true
           end

Example: EnforcedStyleAlignWith: variable

# bad

variable = if true
    end

# good

variable = if true
end

Example: EnforcedStyleAlignWith: startofline

# bad

variable = if true
    end

# good

puts(if true
end)

Line is too long. [501/80]
Open

                  ['rijndael_td1', ["\xa7\xf4\x51\x50\x65\x41\x7e\x53\xa4\x17\x1a\xc3\x5e\x27\x3a\x96\x6b\xab\x3b\xcb\x45\x9d\x1f\xf1\x58\xfa\xac\xab\x03\xe3\x4b\x93\xfa\x30\x20\x55\x6d\x76\xad\xf6\x76\xcc\x88\x91\x4c\x02\xf5\x25\xd7\xe5\x4f\xfc\xcb\x2a\xc5\xd7\x44\x35\x26\x80\xa3\x62\xb5\x8f\x5a\xb1\xde\x49\x1b\xba\x25\x67\x0e\xea\x45\x98\xc0\xfe\x5d\xe1\x75\x2f\xc3\x02\xf0\x4c\x81\x12\x97\x46\x8d\xa3\xf9\xd3\x6b\xc6\x5f\x8f\x03\xe7\x9c\x92\x15\x95\x7a\x6d\xbf\xeb\x59\x52\x95\xda\x83\xbe\xd4"]],

Line is too long. [443/80]
Open

                  ['CAST_S', ["\xd4\x40\xfb\x30\x0b\xff\xa0\x9f\x2f\xcd\xec\x6b\x7a\x8c\x25\x3f\x2f\x3f\x21\x1e\xd3\x4d\x00\x9c\x40\xe5\x03\x60\x49\xc9\x9f\xcf\x27\xaf\xd4\xbf\xb5\xbd\xbb\x88\x90\x40\x03\xe2\x75\x96\xd0\x98\xe0\xa0\x63\x6e\xd2\x61\xc3\x15\x1d\x66\xe7\xc2\x8e\xff\xd4\x22\x6f\x3b\x68\x28\x59\xd0\x7f\xc0\xc8\x79\x23\xff\xe2\x50\x5f\x77\xd3\x40\xc3\x43\x56\x86\x2f\xdf\x1a\xa4\x7c\x88\x2d\xbd\xd2\xa2\xd6\xe0\xc9\xa1\x19\x48"]],

Line is too long. [98/80]
Open

                  ['XXTEA', ["\xa0\x5b\x00\x00\xbb\x82\x00\x00\x59\x01\x00\x00\xc1\x11\x00\x00"]],

Line is too long. [81/80]
Open

  'RegDeleteKeyValueW' => { 'args' => %w[HKEY PWSTR PWSTR], 'tags' => ['Reg_'] },

Line is too long. [265/80]
Open

      strArg = { 0x80000000 => 'HKEY_CLASSES_ROOT ', 0x80000001 => 'HKEY_CURRENT_USER', 0x80000002 => 'HKEY_LOCAL_MACHINE', 0x80000003 => 'HKEY_USERS', 0x80000004 => 'HKEY_PERFORMANCE_DATA', 0x80000005 => 'HKEY_CURRENT_CONFIG', 0x80000006 => 'HKEY_DYN_DATA' }[carg]

Line is too long. [100/80]
Open

    total += calculateSizeSubCallTree(tdi_addr, toaddr, tindent, countSubCallTree(tdi_addr, toaddr))

Line is too long. [119/80]
Open

  if !argStr.nil? && (argStr.length > 4) && (argStr =~ regexStr || ((argStr.length > 5) && (argStr !~ /[\x80-\xff]/n)))

Line is too long. [119/80]
Open

  if !argStr.nil? && (argStr.length > 4) && (argStr =~ regexStr || ((argStr.length > 5) && (argStr !~ /[\x80-\xff]/n)))
Severity
Category
Status
Source
Language