{"action":"opened","number":665,"pull_request":{"url":"https://api.github.com/repos/fossology/fossology/pulls/665","id":64731366,"html_url":"https://github.com/fossology/fossology/pull/665","diff_url":"https://github.com/fossology/fossology/pull/665.diff","patch_url":"https://github.com/fossology/fossology/pull/665.patch","issue_url":"https://api.github.com/repos/fossology/fossology/issues/665","number":665,"state":"open","locked":false,"title":"fix(security) cp2foss SQL injection vulnerability","user":{"login":"timurphy","id":14478587,"avatar_url":"https://avatars.githubusercontent.com/u/14478587?v=3","gravatar_id":"","url":"https://api.github.com/users/timurphy","html_url":"https://github.com/timurphy","followers_url":"https://api.github.com/users/timurphy/followers","following_url":"https://api.github.com/users/timurphy/following{/other_user}","gists_url":"https://api.github.com/users/timurphy/gists{/gist_id}","starred_url":"https://api.github.com/users/timurphy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timurphy/subscriptions","organizations_url":"https://api.github.com/users/timurphy/orgs","repos_url":"https://api.github.com/users/timurphy/repos","events_url":"https://api.github.com/users/timurphy/events{/privacy}","received_events_url":"https://api.github.com/users/timurphy/received_events","type":"User","site_admin":false},"body":"Two SQL queries in the cp2foss utility insert variables into the SQL string, which creates an SQL injection vulnerability. This PR converts those queries into prepared statements using DbManager. SELECT * has also been replaced with SELECT <fields> for efficiency.","created_at":"2016-03-31T03:49:17Z","updated_at":"2016-03-31T03:49:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2b2c00e4c27ab5c0eff5c52f81fa41daf1654ed4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fossology/fossology/pulls/665/commits","review_comments_url":"https://api.github.com/repos/fossology/fossology/pulls/665/comments","review_comment_url":"https://api.github.com/repos/fossology/fossology/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fossology/fossology/issues/665/comments","statuses_url":"https://api.github.com/repos/fossology/fossology/statuses/914c3ff2b5e41f0af91e379faa475cea7acb322e","head":{"label":"timurphy:cp2foss_sql_injection-tmurphy","ref":"cp2foss_sql_injection-tmurphy","sha":"914c3ff2b5e41f0af91e379faa475cea7acb322e","user":{"login":"timurphy","id":14478587,"avatar_url":"https://avatars.githubusercontent.com/u/14478587?v=3","gravatar_id":"","url":"https://api.github.com/users/timurphy","html_url":"https://github.com/timurphy","followers_url":"https://api.github.com/users/timurphy/followers","following_url":"https://api.github.com/users/timurphy/following{/other_user}","gists_url":"https://api.github.com/users/timurphy/gists{/gist_id}","starred_url":"https://api.github.com/users/timurphy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timurphy/subscriptions","organizations_url":"https://api.github.com/users/timurphy/orgs","repos_url":"https://api.github.com/users/timurphy/repos","events_url":"https://api.github.com/users/timurphy/events{/privacy}","received_events_url":"https://api.github.com/users/timurphy/received_events","type":"User","site_admin":false},"repo":{"id":52563993,"name":"fossology","full_name":"timurphy/fossology","owner":{"login":"timurphy","id":14478587,"avatar_url":"https://avatars.githubusercontent.com/u/14478587?v=3","gravatar_id":"","url":"https://api.github.com/users/timurphy","html_url":"https://github.com/timurphy","followers_url":"https://api.github.com/users/timurphy/followers","following_url":"https://api.github.com/users/timurphy/following{/other_user}","gists_url":"https://api.github.com/users/timurphy/gists{/gist_id}","starred_url":"https://api.github.com/users/timurphy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timurphy/subscriptions","organizations_url":"https://api.github.com/users/timurphy/orgs","repos_url":"https://api.github.com/users/timurphy/repos","events_url":"https://api.github.com/users/timurphy/events{/privacy}","received_events_url":"https://api.github.com/users/timurphy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/timurphy/fossology","description":"FOSSology is a open source license compliance software system and toolkit.  As a toolkit you can run license, copyright and export control scans from the command line.  As a system, a database and web ui are provided to give you a compliance workflow. License, copyright and export scanners are tools used in the workflow.","fork":true,"url":"https://api.github.com/repos/timurphy/fossology","forks_url":"https://api.github.com/repos/timurphy/fossology/forks","keys_url":"https://api.github.com/repos/timurphy/fossology/keys{/key_id}","collaborators_url":"https://api.github.com/repos/timurphy/fossology/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/timurphy/fossology/teams","hooks_url":"https://api.github.com/repos/timurphy/fossology/hooks","issue_events_url":"https://api.github.com/repos/timurphy/fossology/issues/events{/number}","events_url":"https://api.github.com/repos/timurphy/fossology/events","assignees_url":"https://api.github.com/repos/timurphy/fossology/assignees{/user}","branches_url":"https://api.github.com/repos/timurphy/fossology/branches{/branch}","tags_url":"https://api.github.com/repos/timurphy/fossology/tags","blobs_url":"https://api.github.com/repos/timurphy/fossology/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/timurphy/fossology/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/timurphy/fossology/git/refs{/sha}","trees_url":"https://api.github.com/repos/timurphy/fossology/git/trees{/sha}","statuses_url":"https://api.github.com/repos/timurphy/fossology/statuses/{sha}","languages_url":"https://api.github.com/repos/timurphy/fossology/languages","stargazers_url":"https://api.github.com/repos/timurphy/fossology/stargazers","contributors_url":"https://api.github.com/repos/timurphy/fossology/contributors","subscribers_url":"https://api.github.com/repos/timurphy/fossology/subscribers","subscription_url":"https://api.github.com/repos/timurphy/fossology/subscription","commits_url":"https://api.github.com/repos/timurphy/fossology/commits{/sha}","git_commits_url":"https://api.github.com/repos/timurphy/fossology/git/commits{/sha}","comments_url":"https://api.github.com/repos/timurphy/fossology/comments{/number}","issue_comment_url":"https://api.github.com/repos/timurphy/fossology/issues/comments{/number}","contents_url":"https://api.github.com/repos/timurphy/fossology/contents/{+path}","compare_url":"https://api.github.com/repos/timurphy/fossology/compare/{base}...{head}","merges_url":"https://api.github.com/repos/timurphy/fossology/merges","archive_url":"https://api.github.com/repos/timurphy/fossology/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/timurphy/fossology/downloads","issues_url":"https://api.github.com/repos/timurphy/fossology/issues{/number}","pulls_url":"https://api.github.com/repos/timurphy/fossology/pulls{/number}","milestones_url":"https://api.github.com/repos/timurphy/fossology/milestones{/number}","notifications_url":"https://api.github.com/repos/timurphy/fossology/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/timurphy/fossology/labels{/name}","releases_url":"https://api.github.com/repos/timurphy/fossology/releases{/id}","deployments_url":"https://api.github.com/repos/timurphy/fossology/deployments","created_at":"2016-02-25T23:21:47Z","updated_at":"2016-02-25T23:21:55Z","pushed_at":"2016-03-31T03:47:57Z","git_url":"git://github.com/timurphy/fossology.git","ssh_url":"git@github.com:timurphy/fossology.git","clone_url":"https://github.com/timurphy/fossology.git","svn_url":"https://github.com/timurphy/fossology","homepage":"","size":273949,"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":"fossology:master","ref":"master","sha":"b2e2adc0f74538a4143713dda0d19d293cac8124","user":{"login":"fossology","id":6004541,"avatar_url":"https://avatars.githubusercontent.com/u/6004541?v=3","gravatar_id":"","url":"https://api.github.com/users/fossology","html_url":"https://github.com/fossology","followers_url":"https://api.github.com/users/fossology/followers","following_url":"https://api.github.com/users/fossology/following{/other_user}","gists_url":"https://api.github.com/users/fossology/gists{/gist_id}","starred_url":"https://api.github.com/users/fossology/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fossology/subscriptions","organizations_url":"https://api.github.com/users/fossology/orgs","repos_url":"https://api.github.com/users/fossology/repos","events_url":"https://api.github.com/users/fossology/events{/privacy}","received_events_url":"https://api.github.com/users/fossology/received_events","type":"Organization","site_admin":false},"repo":{"id":15866170,"name":"fossology","full_name":"fossology/fossology","owner":{"login":"fossology","id":6004541,"avatar_url":"https://avatars.githubusercontent.com/u/6004541?v=3","gravatar_id":"","url":"https://api.github.com/users/fossology","html_url":"https://github.com/fossology","followers_url":"https://api.github.com/users/fossology/followers","following_url":"https://api.github.com/users/fossology/following{/other_user}","gists_url":"https://api.github.com/users/fossology/gists{/gist_id}","starred_url":"https://api.github.com/users/fossology/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fossology/subscriptions","organizations_url":"https://api.github.com/users/fossology/orgs","repos_url":"https://api.github.com/users/fossology/repos","events_url":"https://api.github.com/users/fossology/events{/privacy}","received_events_url":"https://api.github.com/users/fossology/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fossology/fossology","description":"FOSSology is a open source license compliance software system and toolkit.  As a toolkit you can run license, copyright and export control scans from the command line.  As a system, a database and web ui are provided to give you a compliance workflow. License, copyright and export scanners are tools used in the workflow.","fork":false,"url":"https://api.github.com/repos/fossology/fossology","forks_url":"https://api.github.com/repos/fossology/fossology/forks","keys_url":"https://api.github.com/repos/fossology/fossology/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fossology/fossology/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fossology/fossology/teams","hooks_url":"https://api.github.com/repos/fossology/fossology/hooks","issue_events_url":"https://api.github.com/repos/fossology/fossology/issues/events{/number}","events_url":"https://api.github.com/repos/fossology/fossology/events","assignees_url":"https://api.github.com/repos/fossology/fossology/assignees{/user}","branches_url":"https://api.github.com/repos/fossology/fossology/branches{/branch}","tags_url":"https://api.github.com/repos/fossology/fossology/tags","blobs_url":"https://api.github.com/repos/fossology/fossology/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fossology/fossology/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fossology/fossology/git/refs{/sha}","trees_url":"https://api.github.com/repos/fossology/fossology/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fossology/fossology/statuses/{sha}","languages_url":"https://api.github.com/repos/fossology/fossology/languages","stargazers_url":"https://api.github.com/repos/fossology/fossology/stargazers","contributors_url":"https://api.github.com/repos/fossology/fossology/contributors","subscribers_url":"https://api.github.com/repos/fossology/fossology/subscribers","subscription_url":"https://api.github.com/repos/fossology/fossology/subscription","commits_url":"https://api.github.com/repos/fossology/fossology/commits{/sha}","git_commits_url":"https://api.github.com/repos/fossology/fossology/git/commits{/sha}","comments_url":"https://api.github.com/repos/fossology/fossology/comments{/number}","issue_comment_url":"https://api.github.com/repos/fossology/fossology/issues/comments{/number}","contents_url":"https://api.github.com/repos/fossology/fossology/contents/{+path}","compare_url":"https://api.github.com/repos/fossology/fossology/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fossology/fossology/merges","archive_url":"https://api.github.com/repos/fossology/fossology/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fossology/fossology/downloads","issues_url":"https://api.github.com/repos/fossology/fossology/issues{/number}","pulls_url":"https://api.github.com/repos/fossology/fossology/pulls{/number}","milestones_url":"https://api.github.com/repos/fossology/fossology/milestones{/number}","notifications_url":"https://api.github.com/repos/fossology/fossology/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fossology/fossology/labels{/name}","releases_url":"https://api.github.com/repos/fossology/fossology/releases{/id}","deployments_url":"https://api.github.com/repos/fossology/fossology/deployments","created_at":"2014-01-13T11:22:57Z","updated_at":"2016-03-28T10:06:06Z","pushed_at":"2016-03-31T03:49:17Z","git_url":"git://github.com/fossology/fossology.git","ssh_url":"git@github.com:fossology/fossology.git","clone_url":"https://github.com/fossology/fossology.git","svn_url":"https://github.com/fossology/fossology","homepage":"","size":279338,"stargazers_count":61,"watchers_count":61,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":306,"forks":25,"open_issues":306,"watchers":61,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fossology/fossology/pulls/665"},"html":{"href":"https://github.com/fossology/fossology/pull/665"},"issue":{"href":"https://api.github.com/repos/fossology/fossology/issues/665"},"comments":{"href":"https://api.github.com/repos/fossology/fossology/issues/665/comments"},"review_comments":{"href":"https://api.github.com/repos/fossology/fossology/pulls/665/comments"},"review_comment":{"href":"https://api.github.com/repos/fossology/fossology/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fossology/fossology/pulls/665/commits"},"statuses":{"href":"https://api.github.com/repos/fossology/fossology/statuses/914c3ff2b5e41f0af91e379faa475cea7acb322e"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":12,"deletions":21,"changed_files":1}}