juffalow / pentest-tool-lite

Test your page against basic security, html, wordpress, ... check lists
https://pentest-tool-lite.com/
MIT License
25 stars 10 forks source link

Version 3 #53

Closed juffalow closed 3 years ago

juffalow commented 4 years ago

Reasons for this update:

Tests

Security:

HTML:

Options

Subcommands

codecov-commenter commented 4 years ago

Codecov Report

Merging #53 into master will decrease coverage by 18.05%. The diff coverage is 78.68%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #53       +/-   ##
===========================================
- Coverage   96.73%   78.68%   -18.06%     
===========================================
  Files           7       11        +4     
  Lines         276      122      -154     
  Branches       31       10       -21     
===========================================
- Hits          267       96      -171     
- Misses          9       26       +17     
Impacted Files Coverage Δ
src/request/NodeFetch.ts 18.75% <18.75%> (ø)
src/logger/Console.ts 23.07% <23.07%> (ø)
src/Test.ts 66.66% <66.66%> (ø)
src/logger/index.ts 100.00% <100.00%> (ø)
src/request/index.ts 100.00% <100.00%> (ø)
src/security/ContentSecurityPolicy.ts 100.00% <100.00%> (ø)
src/security/FingerPrint.ts 100.00% <100.00%> (ø)
src/security/HSTS.ts 100.00% <100.00%> (ø)
src/security/HTTPS.ts 100.00% <100.00%> (ø)
src/security/XFrameOptions.ts 100.00% <100.00%> (ø)
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b32b891...0a74aa1. Read the comment docs.

codecov-io commented 3 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@676f7c2). Click here to learn what that means. The diff coverage is 72.85%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #53   +/-   ##
=========================================
  Coverage          ?   72.85%           
=========================================
  Files             ?       12           
  Lines             ?      140           
  Branches          ?       12           
=========================================
  Hits              ?      102           
  Misses            ?       38           
  Partials          ?        0           
Impacted Files Coverage Δ
src/request/NodeFetch.ts 18.75% <18.75%> (ø)
src/logger/Console.ts 23.07% <23.07%> (ø)
src/Test.ts 39.13% <39.13%> (ø)
src/config.ts 75.00% <75.00%> (ø)
src/logger/index.ts 100.00% <100.00%> (ø)
src/request/index.ts 100.00% <100.00%> (ø)
src/security/ContentSecurityPolicy.ts 100.00% <100.00%> (ø)
src/security/FingerPrint.ts 100.00% <100.00%> (ø)
src/security/HSTS.ts 100.00% <100.00%> (ø)
src/security/HTTPS.ts 100.00% <100.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 676f7c2...86ca139. Read the comment docs.

Kubik2000 commented 3 years ago

maybe for the future since it is always the same we can change this logger.info('Starting ContentSecurityPolicy test...'); to something like logger.infoStartingMessage('TestNameAsParam'); and do the concatenation like 'Starting ${ContentSecurityPolicy} test...'

or make a common class that would do the logging for all the tests?

Kubik2000 commented 3 years ago

one more idea we can introduce a variable that will hold the name say sut from system under test ` string sut = 'content-security-policy'; class ContentSecurityPolicy extends Test { public async test({ url }: TestParameters): Promise { logger.info('Starting ${sut} test...'); const response = await request.get(url);

if (!Object.prototype.hasOwnProperty.call(response.headers, sut )) {
  return {
    status: 'ERROR',
    title: sut ,
    description: 'Response headers does not contain ${sut } header!',
  };
}

return {
  status: 'SUCCESS',
  title: 'Content-Security-Policy',
  description: `The value of content-security-policy header is ${response.headers['content-security-policy']}.`,
};

} }`