{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/pulls/comments/230634158","pull_request_review_id":171410749,"id":230634158,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMDYzNDE1OA==","diff_hunk":"@@ -144,41 +185,82 @@ def _transform_for_api(self, violations):\n             findings.append(finding)\n         return findings\n \n-    def _send_findings_to_cscc(self, violations, organization_id):\n+\n+    def _send_findings_to_cscc(self, violations, organization_id=None,\n+                               source_id=None):\n         \"\"\"Send violations to CSCC directly via the CSCC API.\n \n         Args:\n             violations (dict): Violations to be uploaded as findings.\n             organization_id (str): The id prefixed with 'organizations/'.\n+            source_id (str): Unique ID assigned by CSCC, to the organization\n+                that the violations are originating from.\n         \"\"\"\n+\n+        # beta api\n+        if source_id:\n+            LOGGER.debug('Sending findings to CSCC with beta API. source_id: '\n+                         '%s', source_id)\n+            findings = self._transform_for_api(violations, source_id=source_id)\n+\n+            client = securitycenter.SecurityCenterClient(version='v1beta1')\n+\n+            for i in findings:","path":"google/cloud/forseti/notifier/notifiers/cscc_notifier.py","position":91,"original_position":91,"commit_id":"bfb81add55dd716e101f7bec5277ec6218923083","original_commit_id":"bfb81add55dd716e101f7bec5277ec6218923083","user":{"login":"blueandgold","id":6977544,"node_id":"MDQ6VXNlcjY5Nzc1NDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6977544?v=4","gravatar_id":"","url":"https://api.github.com/users/blueandgold","html_url":"https://github.com/blueandgold","followers_url":"https://api.github.com/users/blueandgold/followers","following_url":"https://api.github.com/users/blueandgold/following{/other_user}","gists_url":"https://api.github.com/users/blueandgold/gists{/gist_id}","starred_url":"https://api.github.com/users/blueandgold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueandgold/subscriptions","organizations_url":"https://api.github.com/users/blueandgold/orgs","repos_url":"https://api.github.com/users/blueandgold/repos","events_url":"https://api.github.com/users/blueandgold/events{/privacy}","received_events_url":"https://api.github.com/users/blueandgold/received_events","type":"User","site_admin":false},"body":"Good suggestion, done.","created_at":"2018-11-05T04:55:38Z","updated_at":"2018-11-05T04:56:35Z","html_url":"https://github.com/GoogleCloudPlatform/forseti-security/pull/2130#discussion_r230634158","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/pulls/2130","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/pulls/comments/230634158"},"html":{"href":"https://github.com/GoogleCloudPlatform/forseti-security/pull/2130#discussion_r230634158"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/pulls/2130"}},"in_reply_to_id":227457692},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/pulls/2130","id":224925195,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0OTI1MTk1","html_url":"https://github.com/GoogleCloudPlatform/forseti-security/pull/2130","diff_url":"https://github.com/GoogleCloudPlatform/forseti-security/pull/2130.diff","patch_url":"https://github.com/GoogleCloudPlatform/forseti-security/pull/2130.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/issues/2130","number":2130,"state":"open","locked":false,"title":"Add Support for CSCC Beta API","user":{"login":"blueandgold","id":6977544,"node_id":"MDQ6VXNlcjY5Nzc1NDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6977544?v=4","gravatar_id":"","url":"https://api.github.com/users/blueandgold","html_url":"https://github.com/blueandgold","followers_url":"https://api.github.com/users/blueandgold/followers","following_url":"https://api.github.com/users/blueandgold/following{/other_user}","gists_url":"https://api.github.com/users/blueandgold/gists{/gist_id}","starred_url":"https://api.github.com/users/blueandgold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueandgold/subscriptions","organizations_url":"https://api.github.com/users/blueandgold/orgs","repos_url":"https://api.github.com/users/blueandgold/repos","events_url":"https://api.github.com/users/blueandgold/events{/privacy}","received_events_url":"https://api.github.com/users/blueandgold/received_events","type":"User","site_admin":false},"body":"- Also maintains backward compatibility with the alpha API. If you can see a better way to do this, please let me know.\r\n- Will update tests after review.","created_at":"2018-10-23T07:29:18Z","updated_at":"2018-11-05T04:56:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"52e33f2527da2e8788706bd0ac22db248ca9216c","assignee":null,"assignees":[],"requested_reviewers":[{"login":"ahoying","id":4105300,"node_id":"MDQ6VXNlcjQxMDUzMDA=","avatar_url":"https://avatars2.githubusercontent.com/u/4105300?v=4","gravatar_id":"","url":"https://api.github.com/users/ahoying","html_url":"https://github.com/ahoying","followers_url":"https://api.github.com/users/ahoying/followers","following_url":"https://api.github.com/users/ahoying/following{/other_user}","gists_url":"https://api.github.com/users/ahoying/gists{/gist_id}","starred_url":"https://api.github.com/users/ahoying/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahoying/subscriptions","organizations_url":"https://api.github.com/users/ahoying/orgs","repos_url":"https://api.github.com/users/ahoying/repos","events_url":"https://api.github.com/users/ahoying/events{/privacy}","received_events_url":"https://api.github.com/users/ahoying/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":658852504,"node_id":"MDU6TGFiZWw2NTg4NTI1MDQ=","url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/labels/cla:%20yes","name":"cla: yes","color":"ededed","default":false},{"id":769538991,"node_id":"MDU6TGFiZWw3Njk1Mzg5OTE=","url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/labels/status:%20in-progress","name":"status: in-progress","color":"1d76db","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/pulls/2130/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/pulls/2130/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/issues/2130/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/statuses/bfb81add55dd716e101f7bec5277ec6218923083","head":{"label":"GoogleCloudPlatform:csccbeta_final","ref":"csccbeta_final","sha":"bfb81add55dd716e101f7bec5277ec6218923083","user":{"login":"GoogleCloudPlatform","id":2810941,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MTA5NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":82210080,"node_id":"MDEwOlJlcG9zaXRvcnk4MjIxMDA4MA==","name":"forseti-security","full_name":"GoogleCloudPlatform/forseti-security","private":false,"owner":{"login":"GoogleCloudPlatform","id":2810941,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MTA5NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/GoogleCloudPlatform/forseti-security","description":"Forseti Security","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/deployments","created_at":"2017-02-16T18:01:26Z","updated_at":"2018-11-04T17:40:34Z","pushed_at":"2018-11-03T21:36:16Z","git_url":"git://github.com/GoogleCloudPlatform/forseti-security.git","ssh_url":"git@github.com:GoogleCloudPlatform/forseti-security.git","clone_url":"https://github.com/GoogleCloudPlatform/forseti-security.git","svn_url":"https://github.com/GoogleCloudPlatform/forseti-security","homepage":"https://forsetisecurity.org","size":30391,"stargazers_count":793,"watchers_count":793,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":157,"mirror_url":null,"archived":false,"open_issues_count":269,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":157,"open_issues":269,"watchers":793,"default_branch":"dev"}},"base":{"label":"GoogleCloudPlatform:dev","ref":"dev","sha":"7275da1124d53fb8e32841edec03ee240ead9fdd","user":{"login":"GoogleCloudPlatform","id":2810941,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MTA5NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":82210080,"node_id":"MDEwOlJlcG9zaXRvcnk4MjIxMDA4MA==","name":"forseti-security","full_name":"GoogleCloudPlatform/forseti-security","private":false,"owner":{"login":"GoogleCloudPlatform","id":2810941,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MTA5NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/GoogleCloudPlatform/forseti-security","description":"Forseti Security","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/deployments","created_at":"2017-02-16T18:01:26Z","updated_at":"2018-11-04T17:40:34Z","pushed_at":"2018-11-03T21:36:16Z","git_url":"git://github.com/GoogleCloudPlatform/forseti-security.git","ssh_url":"git@github.com:GoogleCloudPlatform/forseti-security.git","clone_url":"https://github.com/GoogleCloudPlatform/forseti-security.git","svn_url":"https://github.com/GoogleCloudPlatform/forseti-security","homepage":"https://forsetisecurity.org","size":30391,"stargazers_count":793,"watchers_count":793,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":157,"mirror_url":null,"archived":false,"open_issues_count":269,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":157,"open_issues":269,"watchers":793,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/pulls/2130"},"html":{"href":"https://github.com/GoogleCloudPlatform/forseti-security/pull/2130"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/issues/2130"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/issues/2130/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/pulls/2130/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/pulls/2130/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/forseti-security/statuses/bfb81add55dd716e101f7bec5277ec6218923083"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"blueandgold"}}