log-to-slack
Advanced tools
Comparing version 1.6.0 to 1.7.0
@@ -262,2 +262,6 @@ 'use strict'; | ||
if( config.get( 'debug' )){ | ||
console.log( chalk.yellow( 'Starting in debug mode' )); | ||
} | ||
servers.forEach( function( serverData, serverKey ){ | ||
@@ -264,0 +268,0 @@ Object.keys( serverData.services ).forEach( function( serviceKey ){ |
@@ -14,4 +14,4 @@ 'use strict'; | ||
apache2.prototype.name = 'apache2'; | ||
apache2.prototype.icon = 'http://i.imgur.com/4cCZiwS.png'; | ||
apache2.prototype.name = 'Apache2 error log'; | ||
apache2.prototype.icon = 'https://static.fbinhouse.se/icon-apache2-16x16.png'; | ||
apache2.prototype.messageCount = 100; | ||
@@ -18,0 +18,0 @@ apache2.prototype.logCommand = 'tail /var/log/apache2/error.log -n'; |
@@ -13,2 +13,6 @@ 'use strict'; | ||
if( typeof this.options.useVulnList === 'undefined' ){ | ||
this.options.useVulnList = true; | ||
} | ||
this.messageList = []; | ||
@@ -19,4 +23,5 @@ this.connection = connection; | ||
apache2.prototype.name = 'apache2'; | ||
apache2.prototype.icon = 'http://i.imgur.com/4cCZiwS.png'; | ||
apache2.prototype.vulnList = require( 'web-vuln-scan-list' ); | ||
apache2.prototype.name = 'Apache2 access log'; | ||
apache2.prototype.icon = 'https://static.fbinhouse.se/icon-apache2-16x16.png'; | ||
apache2.prototype.logCommand = 'tail -n LINECOUNT /var/log/apache2/access.log | grep \'" [4-5][0-9][0-9] \''; | ||
@@ -47,2 +52,3 @@ | ||
var i; | ||
var lowercaseMessage = message.toLowerCase(); | ||
@@ -59,3 +65,3 @@ // Check if we are skipping some status codes | ||
for( i = 0; i < this.options.skipFiles.length; i = i + 1 ){ | ||
if( message.indexOf( this.options.skipFiles[ i ] ) !== -1 ){ | ||
if( lowercaseMessage.indexOf( this.options.skipFiles[ i ] ) !== -1 ){ | ||
return true; | ||
@@ -66,2 +72,11 @@ } | ||
// Check if we are skipping known web vuln scanning urls | ||
if( this.options.useVulnList ){ | ||
for( i = 0; i < this.vulnList.length; i = i + 1 ){ | ||
if( lowercaseMessage.indexOf( this.vulnList[ i ] ) !== -1 ){ | ||
return true; | ||
} | ||
} | ||
} | ||
return false; | ||
@@ -68,0 +83,0 @@ }; |
@@ -13,3 +13,3 @@ 'use strict'; | ||
nginx.prototype.name = 'nginx'; | ||
nginx.prototype.name = 'nginx error log'; | ||
nginx.prototype.icon = 'https://static.fbinhouse.se/icon-nginx-16x16.png'; | ||
@@ -16,0 +16,0 @@ nginx.prototype.messageCount = 100; |
{ | ||
"name": "log-to-slack", | ||
"version": "1.6.0", | ||
"version": "1.7.0", | ||
"description": "Parse logs on remote servers and post new messages to Slack", | ||
@@ -24,9 +24,10 @@ "homepage": "https://github.com/kokarn/log-to-slack", | ||
"moment": "^2.10.6", | ||
"nconf": "^0.8.0", | ||
"nconf": "^0.8.2", | ||
"slack-node": "^0.1.3", | ||
"ssh2": "^0.4.11" | ||
"ssh2": "^0.4.11", | ||
"web-vuln-scan-list": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^1.5.1" | ||
"eslint": "^1.7.2" | ||
} | ||
} |
@@ -54,2 +54,3 @@ # Log to Slack | ||
``` | ||
Default: ```[]``` | ||
@@ -63,2 +64,11 @@ ```skipCodes```: Array of response codes that we shouldn't report. | ||
``` | ||
Default: ```[]``` | ||
```useVulnList```: Use [web-vuln-scan-list](https://github.com/kokarn/web-vuln-scan-list) to exclude common paths used by vulnerability scanners from showing up as errors. | ||
Example | ||
``` | ||
"useVulnList": false | ||
``` | ||
Default: ```true``` | ||
#### Symfony logs | ||
@@ -70,2 +80,3 @@ ```path```: The path to the log file | ||
``` | ||
Default: ```""``` | ||
@@ -72,0 +83,0 @@ #### nginx error logs |
41364
820
126
7
+ Addedweb-vuln-scan-list@^1.0.0
+ Addedweb-vuln-scan-list@1.1.10(transitive)
Updatednconf@^0.8.2