{"action":"created","comment":{"url":"https://api.github.com/repos/banskytest/almostcore/pulls/comments/100958357","pull_request_review_id":21674842,"id":100958357,"diff_hunk":"@@ -0,0 +1,26 @@\n+#include <stdio.h>\n+#include <string.h>\n+\n+int main()\n+{\n+   char src[40];\n+   char dest[100];\n+   char dest2[100];\n+\n+   gets(src); \n+\n+   strcpy(dest, src); \n+ \n+   strncpy(dest,src, strlen(dest)); //DevSkim: ignore DS111237,DS154189 \n+   \n+   strcat(dest, \"this is bad\");\n+\n+   strncat(dest, \"this is also bad\", strlen(dest)); \n+\n+   memcpy(dest2, dest, sizeof dest);\n+\n+   malloc(5);","path":"CPP-Example.cpp","position":22,"original_position":22,"commit_id":"f414f50045d5848f9db9409c411b98d837108a04","original_commit_id":"f414f50045d5848f9db9409c411b98d837108a04","user":{"login":"banskytest","id":22648159,"avatar_url":"https://avatars.githubusercontent.com/u/22648159?v=3","gravatar_id":"","url":"https://api.github.com/users/banskytest","html_url":"https://github.com/banskytest","followers_url":"https://api.github.com/users/banskytest/followers","following_url":"https://api.github.com/users/banskytest/following{/other_user}","gists_url":"https://api.github.com/users/banskytest/gists{/gist_id}","starred_url":"https://api.github.com/users/banskytest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/banskytest/subscriptions","organizations_url":"https://api.github.com/users/banskytest/orgs","repos_url":"https://api.github.com/users/banskytest/repos","events_url":"https://api.github.com/users/banskytest/events{/privacy}","received_events_url":"https://api.github.com/users/banskytest/received_events","type":"User","site_admin":false},"body":"[Problematic C function detected (malloc)](https://github.com/Microsoft/DevSkim/blob/master/guidance/DS161085.md)\nIf the value provided to malloc is the result of unsafe integer math, it can result in an exploitable condition. \n\nSuggestions:\n**0** *+   calloc(<number of elements>, <size of each element>);*\n","created_at":"2017-02-14T04:25:30Z","updated_at":"2017-02-14T04:25:30Z","html_url":"https://github.com/banskytest/almostcore/pull/1#discussion_r100958357","pull_request_url":"https://api.github.com/repos/banskytest/almostcore/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/banskytest/almostcore/pulls/comments/100958357"},"html":{"href":"https://github.com/banskytest/almostcore/pull/1#discussion_r100958357"},"pull_request":{"href":"https://api.github.com/repos/banskytest/almostcore/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/banskytest/almostcore/pulls/1","id":88184120,"html_url":"https://github.com/banskytest/almostcore/pull/1","diff_url":"https://github.com/banskytest/almostcore/pull/1.diff","patch_url":"https://github.com/banskytest/almostcore/pull/1.patch","issue_url":"https://api.github.com/repos/banskytest/almostcore/issues/1","number":1,"state":"open","locked":false,"title":"Hello this is 1st PR","user":{"login":"PavelBansky","id":4472386,"avatar_url":"https://avatars.githubusercontent.com/u/4472386?v=3","gravatar_id":"","url":"https://api.github.com/users/PavelBansky","html_url":"https://github.com/PavelBansky","followers_url":"https://api.github.com/users/PavelBansky/followers","following_url":"https://api.github.com/users/PavelBansky/following{/other_user}","gists_url":"https://api.github.com/users/PavelBansky/gists{/gist_id}","starred_url":"https://api.github.com/users/PavelBansky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PavelBansky/subscriptions","organizations_url":"https://api.github.com/users/PavelBansky/orgs","repos_url":"https://api.github.com/users/PavelBansky/repos","events_url":"https://api.github.com/users/PavelBansky/events{/privacy}","received_events_url":"https://api.github.com/users/PavelBansky/received_events","type":"User","site_admin":false},"body":"1 file remove\n1 file added\n1 changed\n","created_at":"2016-10-06T01:07:08Z","updated_at":"2017-02-14T04:25:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b95ead9e7daea3b05bb8fbcc948b2b9dee8db49","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/banskytest/almostcore/pulls/1/commits","review_comments_url":"https://api.github.com/repos/banskytest/almostcore/pulls/1/comments","review_comment_url":"https://api.github.com/repos/banskytest/almostcore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/banskytest/almostcore/issues/1/comments","statuses_url":"https://api.github.com/repos/banskytest/almostcore/statuses/f414f50045d5848f9db9409c411b98d837108a04","head":{"label":"PavelBansky:master","ref":"master","sha":"f414f50045d5848f9db9409c411b98d837108a04","user":{"login":"PavelBansky","id":4472386,"avatar_url":"https://avatars.githubusercontent.com/u/4472386?v=3","gravatar_id":"","url":"https://api.github.com/users/PavelBansky","html_url":"https://github.com/PavelBansky","followers_url":"https://api.github.com/users/PavelBansky/followers","following_url":"https://api.github.com/users/PavelBansky/following{/other_user}","gists_url":"https://api.github.com/users/PavelBansky/gists{/gist_id}","starred_url":"https://api.github.com/users/PavelBansky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PavelBansky/subscriptions","organizations_url":"https://api.github.com/users/PavelBansky/orgs","repos_url":"https://api.github.com/users/PavelBansky/repos","events_url":"https://api.github.com/users/PavelBansky/events{/privacy}","received_events_url":"https://api.github.com/users/PavelBansky/received_events","type":"User","site_admin":false},"repo":{"id":70108819,"name":"almostcore","full_name":"PavelBansky/almostcore","owner":{"login":"PavelBansky","id":4472386,"avatar_url":"https://avatars.githubusercontent.com/u/4472386?v=3","gravatar_id":"","url":"https://api.github.com/users/PavelBansky","html_url":"https://github.com/PavelBansky","followers_url":"https://api.github.com/users/PavelBansky/followers","following_url":"https://api.github.com/users/PavelBansky/following{/other_user}","gists_url":"https://api.github.com/users/PavelBansky/gists{/gist_id}","starred_url":"https://api.github.com/users/PavelBansky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PavelBansky/subscriptions","organizations_url":"https://api.github.com/users/PavelBansky/orgs","repos_url":"https://api.github.com/users/PavelBansky/repos","events_url":"https://api.github.com/users/PavelBansky/events{/privacy}","received_events_url":"https://api.github.com/users/PavelBansky/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PavelBansky/almostcore","description":"test repository for testing :)","fork":true,"url":"https://api.github.com/repos/PavelBansky/almostcore","forks_url":"https://api.github.com/repos/PavelBansky/almostcore/forks","keys_url":"https://api.github.com/repos/PavelBansky/almostcore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PavelBansky/almostcore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PavelBansky/almostcore/teams","hooks_url":"https://api.github.com/repos/PavelBansky/almostcore/hooks","issue_events_url":"https://api.github.com/repos/PavelBansky/almostcore/issues/events{/number}","events_url":"https://api.github.com/repos/PavelBansky/almostcore/events","assignees_url":"https://api.github.com/repos/PavelBansky/almostcore/assignees{/user}","branches_url":"https://api.github.com/repos/PavelBansky/almostcore/branches{/branch}","tags_url":"https://api.github.com/repos/PavelBansky/almostcore/tags","blobs_url":"https://api.github.com/repos/PavelBansky/almostcore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PavelBansky/almostcore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PavelBansky/almostcore/git/refs{/sha}","trees_url":"https://api.github.com/repos/PavelBansky/almostcore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PavelBansky/almostcore/statuses/{sha}","languages_url":"https://api.github.com/repos/PavelBansky/almostcore/languages","stargazers_url":"https://api.github.com/repos/PavelBansky/almostcore/stargazers","contributors_url":"https://api.github.com/repos/PavelBansky/almostcore/contributors","subscribers_url":"https://api.github.com/repos/PavelBansky/almostcore/subscribers","subscription_url":"https://api.github.com/repos/PavelBansky/almostcore/subscription","commits_url":"https://api.github.com/repos/PavelBansky/almostcore/commits{/sha}","git_commits_url":"https://api.github.com/repos/PavelBansky/almostcore/git/commits{/sha}","comments_url":"https://api.github.com/repos/PavelBansky/almostcore/comments{/number}","issue_comment_url":"https://api.github.com/repos/PavelBansky/almostcore/issues/comments{/number}","contents_url":"https://api.github.com/repos/PavelBansky/almostcore/contents/{+path}","compare_url":"https://api.github.com/repos/PavelBansky/almostcore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PavelBansky/almostcore/merges","archive_url":"https://api.github.com/repos/PavelBansky/almostcore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PavelBansky/almostcore/downloads","issues_url":"https://api.github.com/repos/PavelBansky/almostcore/issues{/number}","pulls_url":"https://api.github.com/repos/PavelBansky/almostcore/pulls{/number}","milestones_url":"https://api.github.com/repos/PavelBansky/almostcore/milestones{/number}","notifications_url":"https://api.github.com/repos/PavelBansky/almostcore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PavelBansky/almostcore/labels{/name}","releases_url":"https://api.github.com/repos/PavelBansky/almostcore/releases{/id}","deployments_url":"https://api.github.com/repos/PavelBansky/almostcore/deployments","created_at":"2016-10-05T23:56:12Z","updated_at":"2016-10-05T23:56:13Z","pushed_at":"2017-02-14T04:11:42Z","git_url":"git://github.com/PavelBansky/almostcore.git","ssh_url":"git@github.com:PavelBansky/almostcore.git","clone_url":"https://github.com/PavelBansky/almostcore.git","svn_url":"https://github.com/PavelBansky/almostcore","homepage":null,"size":9,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"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":"banskytest:master","ref":"master","sha":"e9b5d1de5798f77cb050a541fc8dd048184091cd","user":{"login":"banskytest","id":22648159,"avatar_url":"https://avatars.githubusercontent.com/u/22648159?v=3","gravatar_id":"","url":"https://api.github.com/users/banskytest","html_url":"https://github.com/banskytest","followers_url":"https://api.github.com/users/banskytest/followers","following_url":"https://api.github.com/users/banskytest/following{/other_user}","gists_url":"https://api.github.com/users/banskytest/gists{/gist_id}","starred_url":"https://api.github.com/users/banskytest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/banskytest/subscriptions","organizations_url":"https://api.github.com/users/banskytest/orgs","repos_url":"https://api.github.com/users/banskytest/repos","events_url":"https://api.github.com/users/banskytest/events{/privacy}","received_events_url":"https://api.github.com/users/banskytest/received_events","type":"User","site_admin":false},"repo":{"id":70107366,"name":"almostcore","full_name":"banskytest/almostcore","owner":{"login":"banskytest","id":22648159,"avatar_url":"https://avatars.githubusercontent.com/u/22648159?v=3","gravatar_id":"","url":"https://api.github.com/users/banskytest","html_url":"https://github.com/banskytest","followers_url":"https://api.github.com/users/banskytest/followers","following_url":"https://api.github.com/users/banskytest/following{/other_user}","gists_url":"https://api.github.com/users/banskytest/gists{/gist_id}","starred_url":"https://api.github.com/users/banskytest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/banskytest/subscriptions","organizations_url":"https://api.github.com/users/banskytest/orgs","repos_url":"https://api.github.com/users/banskytest/repos","events_url":"https://api.github.com/users/banskytest/events{/privacy}","received_events_url":"https://api.github.com/users/banskytest/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/banskytest/almostcore","description":"test repository for testing :)","fork":false,"url":"https://api.github.com/repos/banskytest/almostcore","forks_url":"https://api.github.com/repos/banskytest/almostcore/forks","keys_url":"https://api.github.com/repos/banskytest/almostcore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/banskytest/almostcore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/banskytest/almostcore/teams","hooks_url":"https://api.github.com/repos/banskytest/almostcore/hooks","issue_events_url":"https://api.github.com/repos/banskytest/almostcore/issues/events{/number}","events_url":"https://api.github.com/repos/banskytest/almostcore/events","assignees_url":"https://api.github.com/repos/banskytest/almostcore/assignees{/user}","branches_url":"https://api.github.com/repos/banskytest/almostcore/branches{/branch}","tags_url":"https://api.github.com/repos/banskytest/almostcore/tags","blobs_url":"https://api.github.com/repos/banskytest/almostcore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/banskytest/almostcore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/banskytest/almostcore/git/refs{/sha}","trees_url":"https://api.github.com/repos/banskytest/almostcore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/banskytest/almostcore/statuses/{sha}","languages_url":"https://api.github.com/repos/banskytest/almostcore/languages","stargazers_url":"https://api.github.com/repos/banskytest/almostcore/stargazers","contributors_url":"https://api.github.com/repos/banskytest/almostcore/contributors","subscribers_url":"https://api.github.com/repos/banskytest/almostcore/subscribers","subscription_url":"https://api.github.com/repos/banskytest/almostcore/subscription","commits_url":"https://api.github.com/repos/banskytest/almostcore/commits{/sha}","git_commits_url":"https://api.github.com/repos/banskytest/almostcore/git/commits{/sha}","comments_url":"https://api.github.com/repos/banskytest/almostcore/comments{/number}","issue_comment_url":"https://api.github.com/repos/banskytest/almostcore/issues/comments{/number}","contents_url":"https://api.github.com/repos/banskytest/almostcore/contents/{+path}","compare_url":"https://api.github.com/repos/banskytest/almostcore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/banskytest/almostcore/merges","archive_url":"https://api.github.com/repos/banskytest/almostcore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/banskytest/almostcore/downloads","issues_url":"https://api.github.com/repos/banskytest/almostcore/issues{/number}","pulls_url":"https://api.github.com/repos/banskytest/almostcore/pulls{/number}","milestones_url":"https://api.github.com/repos/banskytest/almostcore/milestones{/number}","notifications_url":"https://api.github.com/repos/banskytest/almostcore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/banskytest/almostcore/labels{/name}","releases_url":"https://api.github.com/repos/banskytest/almostcore/releases{/id}","deployments_url":"https://api.github.com/repos/banskytest/almostcore/deployments","created_at":"2016-10-05T23:23:57Z","updated_at":"2016-10-05T23:24:03Z","pushed_at":"2017-02-14T04:11:43Z","git_url":"git://github.com/banskytest/almostcore.git","ssh_url":"git@github.com:banskytest/almostcore.git","clone_url":"https://github.com/banskytest/almostcore.git","svn_url":"https://github.com/banskytest/almostcore","homepage":null,"size":8,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/banskytest/almostcore/pulls/1"},"html":{"href":"https://github.com/banskytest/almostcore/pull/1"},"issue":{"href":"https://api.github.com/repos/banskytest/almostcore/issues/1"},"comments":{"href":"https://api.github.com/repos/banskytest/almostcore/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/banskytest/almostcore/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/banskytest/almostcore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/banskytest/almostcore/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/banskytest/almostcore/statuses/f414f50045d5848f9db9409c411b98d837108a04"}}}}
{"actor":{"display_login":"banskytest"}}