{"action":"created","comment":{"url":"https://api.github.com/repos/zaproxy/zap-extensions/pulls/comments/93428346","pull_request_review_id":13953716,"id":93428346,"diff_hunk":"@@ -0,0 +1,154 @@\n+package org.zaproxy.zap.extension.csphelper;\n+\n+import java.io.FileNotFoundException;\n+import java.io.FileReader;\n+import java.io.IOException;\n+\n+import net.sf.json.JSONObject;\n+\n+import org.apache.log4j.Logger;\n+import org.parosproxy.paros.network.HttpMessage;\n+import org.parosproxy.paros.view.View;\n+import org.zaproxy.zap.extension.api.ApiException;\n+import org.zaproxy.zap.extension.api.ApiImplementor;\n+import org.zaproxy.zap.extension.api.ApiResponse;\n+import org.zaproxy.zap.extension.api.ApiResponseElement;\n+\n+///This class extends the ImportLog functionality to the ZAP REST API \n+public class CspHelperAPI extends ApiImplementor {\n+\n+    private static Logger log = Logger.getLogger(CspHelperAPI.class);\n+\n+    // API method names\n+    private static final String PREFIX = \"csphelper\";\n+    private static final String Import_Zap_Log_From_File = \"ImportZAPLogFromFile\";\n+    private static final String Import_ModSec_Log_From_File = \"ImportModSecurityLogFromFile\";\n+    private static final String Import_Zap_HttpRequestResponsePair = \"ImportZAPHttpRequestResponsePair\";\n+    private static final String POST_ModSec_AuditEvent = \"PostModSecurityAuditEvent\";\n+    private static final String OtherPOST_ModSec_AuditEvent = \"OtherPostModSecurityAuditEvent\";\n+\n+    // API method parameters\n+    private static final String PARAM_FILE = \"FilePath\";","path":"src/org/zaproxy/zap/extension/csphelper/CspHelperAPI.java","position":31,"original_position":31,"commit_id":"754d762b5baa0b8a6adae7766dcd15270b0f9246","original_commit_id":"754d762b5baa0b8a6adae7766dcd15270b0f9246","user":{"login":"thc202","id":4639210,"avatar_url":"https://avatars.githubusercontent.com/u/4639210?v=3","gravatar_id":"","url":"https://api.github.com/users/thc202","html_url":"https://github.com/thc202","followers_url":"https://api.github.com/users/thc202/followers","following_url":"https://api.github.com/users/thc202/following{/other_user}","gists_url":"https://api.github.com/users/thc202/gists{/gist_id}","starred_url":"https://api.github.com/users/thc202/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thc202/subscriptions","organizations_url":"https://api.github.com/users/thc202/orgs","repos_url":"https://api.github.com/users/thc202/repos","events_url":"https://api.github.com/users/thc202/events{/privacy}","received_events_url":"https://api.github.com/users/thc202/received_events","type":"User","site_admin":false},"body":"Parameters should be removed as well?","created_at":"2016-12-21T12:20:25Z","updated_at":"2016-12-21T12:20:25Z","html_url":"https://github.com/zaproxy/zap-extensions/pull/668#discussion_r93428346","pull_request_url":"https://api.github.com/repos/zaproxy/zap-extensions/pulls/668","_links":{"self":{"href":"https://api.github.com/repos/zaproxy/zap-extensions/pulls/comments/93428346"},"html":{"href":"https://github.com/zaproxy/zap-extensions/pull/668#discussion_r93428346"},"pull_request":{"href":"https://api.github.com/repos/zaproxy/zap-extensions/pulls/668"}}},"pull_request":{"url":"https://api.github.com/repos/zaproxy/zap-extensions/pulls/668","id":98752652,"html_url":"https://github.com/zaproxy/zap-extensions/pull/668","diff_url":"https://github.com/zaproxy/zap-extensions/pull/668.diff","patch_url":"https://github.com/zaproxy/zap-extensions/pull/668.patch","issue_url":"https://api.github.com/repos/zaproxy/zap-extensions/issues/668","number":668,"state":"open","locked":false,"title":"Committing CSP helper to alpha","user":{"login":"chutchut","id":6414463,"avatar_url":"https://avatars.githubusercontent.com/u/6414463?v=3","gravatar_id":"","url":"https://api.github.com/users/chutchut","html_url":"https://github.com/chutchut","followers_url":"https://api.github.com/users/chutchut/followers","following_url":"https://api.github.com/users/chutchut/following{/other_user}","gists_url":"https://api.github.com/users/chutchut/gists{/gist_id}","starred_url":"https://api.github.com/users/chutchut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chutchut/subscriptions","organizations_url":"https://api.github.com/users/chutchut/orgs","repos_url":"https://api.github.com/users/chutchut/repos","events_url":"https://api.github.com/users/chutchut/events{/privacy}","received_events_url":"https://api.github.com/users/chutchut/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-20T13:55:02Z","updated_at":"2016-12-21T12:38:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"39676b9d3559978e89f6338058818aa55c777877","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/zaproxy/zap-extensions/pulls/668/commits","review_comments_url":"https://api.github.com/repos/zaproxy/zap-extensions/pulls/668/comments","review_comment_url":"https://api.github.com/repos/zaproxy/zap-extensions/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zaproxy/zap-extensions/issues/668/comments","statuses_url":"https://api.github.com/repos/zaproxy/zap-extensions/statuses/754d762b5baa0b8a6adae7766dcd15270b0f9246","head":{"label":"chutchut:alpha","ref":"alpha","sha":"754d762b5baa0b8a6adae7766dcd15270b0f9246","user":{"login":"chutchut","id":6414463,"avatar_url":"https://avatars.githubusercontent.com/u/6414463?v=3","gravatar_id":"","url":"https://api.github.com/users/chutchut","html_url":"https://github.com/chutchut","followers_url":"https://api.github.com/users/chutchut/followers","following_url":"https://api.github.com/users/chutchut/following{/other_user}","gists_url":"https://api.github.com/users/chutchut/gists{/gist_id}","starred_url":"https://api.github.com/users/chutchut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chutchut/subscriptions","organizations_url":"https://api.github.com/users/chutchut/orgs","repos_url":"https://api.github.com/users/chutchut/repos","events_url":"https://api.github.com/users/chutchut/events{/privacy}","received_events_url":"https://api.github.com/users/chutchut/received_events","type":"User","site_admin":false},"repo":{"id":57142199,"name":"zap-extensions","full_name":"chutchut/zap-extensions","owner":{"login":"chutchut","id":6414463,"avatar_url":"https://avatars.githubusercontent.com/u/6414463?v=3","gravatar_id":"","url":"https://api.github.com/users/chutchut","html_url":"https://github.com/chutchut","followers_url":"https://api.github.com/users/chutchut/followers","following_url":"https://api.github.com/users/chutchut/following{/other_user}","gists_url":"https://api.github.com/users/chutchut/gists{/gist_id}","starred_url":"https://api.github.com/users/chutchut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chutchut/subscriptions","organizations_url":"https://api.github.com/users/chutchut/orgs","repos_url":"https://api.github.com/users/chutchut/repos","events_url":"https://api.github.com/users/chutchut/events{/privacy}","received_events_url":"https://api.github.com/users/chutchut/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chutchut/zap-extensions","description":"OWASP ZAP Add-ons","fork":true,"url":"https://api.github.com/repos/chutchut/zap-extensions","forks_url":"https://api.github.com/repos/chutchut/zap-extensions/forks","keys_url":"https://api.github.com/repos/chutchut/zap-extensions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chutchut/zap-extensions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chutchut/zap-extensions/teams","hooks_url":"https://api.github.com/repos/chutchut/zap-extensions/hooks","issue_events_url":"https://api.github.com/repos/chutchut/zap-extensions/issues/events{/number}","events_url":"https://api.github.com/repos/chutchut/zap-extensions/events","assignees_url":"https://api.github.com/repos/chutchut/zap-extensions/assignees{/user}","branches_url":"https://api.github.com/repos/chutchut/zap-extensions/branches{/branch}","tags_url":"https://api.github.com/repos/chutchut/zap-extensions/tags","blobs_url":"https://api.github.com/repos/chutchut/zap-extensions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chutchut/zap-extensions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chutchut/zap-extensions/git/refs{/sha}","trees_url":"https://api.github.com/repos/chutchut/zap-extensions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chutchut/zap-extensions/statuses/{sha}","languages_url":"https://api.github.com/repos/chutchut/zap-extensions/languages","stargazers_url":"https://api.github.com/repos/chutchut/zap-extensions/stargazers","contributors_url":"https://api.github.com/repos/chutchut/zap-extensions/contributors","subscribers_url":"https://api.github.com/repos/chutchut/zap-extensions/subscribers","subscription_url":"https://api.github.com/repos/chutchut/zap-extensions/subscription","commits_url":"https://api.github.com/repos/chutchut/zap-extensions/commits{/sha}","git_commits_url":"https://api.github.com/repos/chutchut/zap-extensions/git/commits{/sha}","comments_url":"https://api.github.com/repos/chutchut/zap-extensions/comments{/number}","issue_comment_url":"https://api.github.com/repos/chutchut/zap-extensions/issues/comments{/number}","contents_url":"https://api.github.com/repos/chutchut/zap-extensions/contents/{+path}","compare_url":"https://api.github.com/repos/chutchut/zap-extensions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chutchut/zap-extensions/merges","archive_url":"https://api.github.com/repos/chutchut/zap-extensions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chutchut/zap-extensions/downloads","issues_url":"https://api.github.com/repos/chutchut/zap-extensions/issues{/number}","pulls_url":"https://api.github.com/repos/chutchut/zap-extensions/pulls{/number}","milestones_url":"https://api.github.com/repos/chutchut/zap-extensions/milestones{/number}","notifications_url":"https://api.github.com/repos/chutchut/zap-extensions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chutchut/zap-extensions/labels{/name}","releases_url":"https://api.github.com/repos/chutchut/zap-extensions/releases{/id}","deployments_url":"https://api.github.com/repos/chutchut/zap-extensions/deployments","created_at":"2016-04-26T15:59:57Z","updated_at":"2016-04-26T16:00:07Z","pushed_at":"2016-12-20T13:53:14Z","git_url":"git://github.com/chutchut/zap-extensions.git","ssh_url":"git@github.com:chutchut/zap-extensions.git","clone_url":"https://github.com/chutchut/zap-extensions.git","svn_url":"https://github.com/chutchut/zap-extensions","homepage":"","size":656022,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"zaproxy:alpha","ref":"alpha","sha":"07b81b6217a47985fd527030c9b04778a6e21f07","user":{"login":"zaproxy","id":6716868,"avatar_url":"https://avatars.githubusercontent.com/u/6716868?v=3","gravatar_id":"","url":"https://api.github.com/users/zaproxy","html_url":"https://github.com/zaproxy","followers_url":"https://api.github.com/users/zaproxy/followers","following_url":"https://api.github.com/users/zaproxy/following{/other_user}","gists_url":"https://api.github.com/users/zaproxy/gists{/gist_id}","starred_url":"https://api.github.com/users/zaproxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zaproxy/subscriptions","organizations_url":"https://api.github.com/users/zaproxy/orgs","repos_url":"https://api.github.com/users/zaproxy/repos","events_url":"https://api.github.com/users/zaproxy/events{/privacy}","received_events_url":"https://api.github.com/users/zaproxy/received_events","type":"Organization","site_admin":false},"repo":{"id":35210580,"name":"zap-extensions","full_name":"zaproxy/zap-extensions","owner":{"login":"zaproxy","id":6716868,"avatar_url":"https://avatars.githubusercontent.com/u/6716868?v=3","gravatar_id":"","url":"https://api.github.com/users/zaproxy","html_url":"https://github.com/zaproxy","followers_url":"https://api.github.com/users/zaproxy/followers","following_url":"https://api.github.com/users/zaproxy/following{/other_user}","gists_url":"https://api.github.com/users/zaproxy/gists{/gist_id}","starred_url":"https://api.github.com/users/zaproxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zaproxy/subscriptions","organizations_url":"https://api.github.com/users/zaproxy/orgs","repos_url":"https://api.github.com/users/zaproxy/repos","events_url":"https://api.github.com/users/zaproxy/events{/privacy}","received_events_url":"https://api.github.com/users/zaproxy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zaproxy/zap-extensions","description":"OWASP ZAP Add-ons","fork":false,"url":"https://api.github.com/repos/zaproxy/zap-extensions","forks_url":"https://api.github.com/repos/zaproxy/zap-extensions/forks","keys_url":"https://api.github.com/repos/zaproxy/zap-extensions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zaproxy/zap-extensions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zaproxy/zap-extensions/teams","hooks_url":"https://api.github.com/repos/zaproxy/zap-extensions/hooks","issue_events_url":"https://api.github.com/repos/zaproxy/zap-extensions/issues/events{/number}","events_url":"https://api.github.com/repos/zaproxy/zap-extensions/events","assignees_url":"https://api.github.com/repos/zaproxy/zap-extensions/assignees{/user}","branches_url":"https://api.github.com/repos/zaproxy/zap-extensions/branches{/branch}","tags_url":"https://api.github.com/repos/zaproxy/zap-extensions/tags","blobs_url":"https://api.github.com/repos/zaproxy/zap-extensions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zaproxy/zap-extensions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zaproxy/zap-extensions/git/refs{/sha}","trees_url":"https://api.github.com/repos/zaproxy/zap-extensions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zaproxy/zap-extensions/statuses/{sha}","languages_url":"https://api.github.com/repos/zaproxy/zap-extensions/languages","stargazers_url":"https://api.github.com/repos/zaproxy/zap-extensions/stargazers","contributors_url":"https://api.github.com/repos/zaproxy/zap-extensions/contributors","subscribers_url":"https://api.github.com/repos/zaproxy/zap-extensions/subscribers","subscription_url":"https://api.github.com/repos/zaproxy/zap-extensions/subscription","commits_url":"https://api.github.com/repos/zaproxy/zap-extensions/commits{/sha}","git_commits_url":"https://api.github.com/repos/zaproxy/zap-extensions/git/commits{/sha}","comments_url":"https://api.github.com/repos/zaproxy/zap-extensions/comments{/number}","issue_comment_url":"https://api.github.com/repos/zaproxy/zap-extensions/issues/comments{/number}","contents_url":"https://api.github.com/repos/zaproxy/zap-extensions/contents/{+path}","compare_url":"https://api.github.com/repos/zaproxy/zap-extensions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zaproxy/zap-extensions/merges","archive_url":"https://api.github.com/repos/zaproxy/zap-extensions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zaproxy/zap-extensions/downloads","issues_url":"https://api.github.com/repos/zaproxy/zap-extensions/issues{/number}","pulls_url":"https://api.github.com/repos/zaproxy/zap-extensions/pulls{/number}","milestones_url":"https://api.github.com/repos/zaproxy/zap-extensions/milestones{/number}","notifications_url":"https://api.github.com/repos/zaproxy/zap-extensions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zaproxy/zap-extensions/labels{/name}","releases_url":"https://api.github.com/repos/zaproxy/zap-extensions/releases{/id}","deployments_url":"https://api.github.com/repos/zaproxy/zap-extensions/deployments","created_at":"2015-05-07T09:17:13Z","updated_at":"2016-12-21T09:41:53Z","pushed_at":"2016-12-21T01:02:37Z","git_url":"git://github.com/zaproxy/zap-extensions.git","ssh_url":"git@github.com:zaproxy/zap-extensions.git","clone_url":"https://github.com/zaproxy/zap-extensions.git","svn_url":"https://github.com/zaproxy/zap-extensions","homepage":"","size":711239,"stargazers_count":105,"watchers_count":105,"language":"HTML","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":127,"mirror_url":null,"open_issues_count":18,"forks":127,"open_issues":18,"watchers":105,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zaproxy/zap-extensions/pulls/668"},"html":{"href":"https://github.com/zaproxy/zap-extensions/pull/668"},"issue":{"href":"https://api.github.com/repos/zaproxy/zap-extensions/issues/668"},"comments":{"href":"https://api.github.com/repos/zaproxy/zap-extensions/issues/668/comments"},"review_comments":{"href":"https://api.github.com/repos/zaproxy/zap-extensions/pulls/668/comments"},"review_comment":{"href":"https://api.github.com/repos/zaproxy/zap-extensions/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zaproxy/zap-extensions/pulls/668/commits"},"statuses":{"href":"https://api.github.com/repos/zaproxy/zap-extensions/statuses/754d762b5baa0b8a6adae7766dcd15270b0f9246"}}}}
{"actor":{"display_login":"thc202"}}