{"action":"created","issue":{"url":"https://api.github.com/repos/fictional-tribble/OWASP--NodeGoat/issues/2","repository_url":"https://api.github.com/repos/fictional-tribble/OWASP--NodeGoat","labels_url":"https://api.github.com/repos/fictional-tribble/OWASP--NodeGoat/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/fictional-tribble/OWASP--NodeGoat/issues/2/comments","events_url":"https://api.github.com/repos/fictional-tribble/OWASP--NodeGoat/issues/2/events","html_url":"https://github.com/fictional-tribble/OWASP--NodeGoat/pull/2","id":341728624,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxNzk4MTA0","number":2,"title":"GuardRails Test","user":{"login":"MrHiggins","id":5213641,"node_id":"MDQ6VXNlcjUyMTM2NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/5213641?v=4","gravatar_id":"","url":"https://api.github.com/users/MrHiggins","html_url":"https://github.com/MrHiggins","followers_url":"https://api.github.com/users/MrHiggins/followers","following_url":"https://api.github.com/users/MrHiggins/following{/other_user}","gists_url":"https://api.github.com/users/MrHiggins/gists{/gist_id}","starred_url":"https://api.github.com/users/MrHiggins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrHiggins/subscriptions","organizations_url":"https://api.github.com/users/MrHiggins/orgs","repos_url":"https://api.github.com/users/MrHiggins/repos","events_url":"https://api.github.com/users/MrHiggins/events{/privacy}","received_events_url":"https://api.github.com/users/MrHiggins/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-17T01:00:19Z","updated_at":"2018-07-17T01:04:43Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/fictional-tribble/OWASP--NodeGoat/pulls/2","html_url":"https://github.com/fictional-tribble/OWASP--NodeGoat/pull/2","diff_url":"https://github.com/fictional-tribble/OWASP--NodeGoat/pull/2.diff","patch_url":"https://github.com/fictional-tribble/OWASP--NodeGoat/pull/2.patch"},"body":"n/t"},"comment":{"url":"https://api.github.com/repos/fictional-tribble/OWASP--NodeGoat/issues/comments/405426580","html_url":"https://github.com/fictional-tribble/OWASP--NodeGoat/pull/2#issuecomment-405426580","issue_url":"https://api.github.com/repos/fictional-tribble/OWASP--NodeGoat/issues/2","id":405426580,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTQyNjU4MA==","user":{"login":"guardrails[bot]","id":32328362,"node_id":"MDM6Qm90MzIzMjgzNjI=","avatar_url":"https://avatars2.githubusercontent.com/in/5512?v=4","gravatar_id":"","url":"https://api.github.com/users/guardrails%5Bbot%5D","html_url":"https://github.com/apps/guardrails","followers_url":"https://api.github.com/users/guardrails%5Bbot%5D/followers","following_url":"https://api.github.com/users/guardrails%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/guardrails%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/guardrails%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardrails%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/guardrails%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/guardrails%5Bbot%5D/repos","events_url":"https://api.github.com/users/guardrails%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/guardrails%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-07-17T01:04:43Z","updated_at":"2018-07-17T01:04:43Z","author_association":"CONTRIBUTOR","body":"\n\n  # GuardRails Report\n\n  ## Issues in your ...\n\n  ### ... Source Code\n\n  \n<details>\n    <summary>Insecure Regular Expressions (1)</summary>\n\n   - [/app/routes/profile.js:37](https://github.com/fictional-tribble/OWASP--NodeGoat/tree/testing/new_branch/app/routes/profile.js#L37)\n\nMore info on [Insecure Regular Expressions](https://docs.gr.io/insecure_regular_expressions.html).\n\n**How to fix this:**\n\n<details>\n<summary>Use Safe-Regex</summary>\n\n1.  Install [Safe-Regex](https://github.com/substack/safe-regex) as a dev dependency.\n\n~~~bash\nnpm install --save-dev safe-regex\n~~~\n\n2. Create a file named `safe.js` with the following content.\n\n~~~javascript\nvar safe = require('safe-regex');\nvar regex = process.argv.slice(2).join(' ');\nconsole.log(safe(regex));\n~~~\n\n3. Go through each of the issues that are listed above above.\n4. Identify any '*' or '+' operators that are close to each other.\n5. Remove them and test the new regex with the `safe.js` script until it returns `true`.\n\n~~~bash\n$ node safe.js '(x+x+)+y'\nfalse\n$ node safe.js '(x+x+)y'\ntrue\n~~~\n\n6. Test it and ensure the regex is still working as expected.\n7. Ship it 🚢 and relax 🌴\n</details>\n\n---\n\n</details>\n\n\n  \n\n\n---\n\nYour [GuardRails](https://www.guardrails.io) bot :owl:\n\n"}}
{"actor":{"display_login":"guardrails"}}