{"action":"created","comment":{"url":"https://api.github.com/repos/chef/automate/pulls/comments/284338322","pull_request_review_id":237928755,"id":284338322,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI4NDMzODMyMg==","diff_hunk":"@@ -92,8 +91,10 @@ func buildWhereFilter(mergeableFilters []*common.Filter, tableAbbrev string, fil\n \n // Builds an IN where condition like: j.parent_id IN ('e57605ed-bb8a-49b8-606c-af0e2b31b139')\n func whereFieldIn(field string, arr []string, tableAbbrev string) (condition string, err error) {\n-\tif !utils.IsSqlSafe(field) {\n-\t\treturn \"\", &utils.InvalidError{Msg: fmt.Sprintf(\"Unsupported character found in field: %s\", field)}\n+\tif !acceptedJSONFilterFields(field) {\n+\t\tif !utils.IsSqlSafe(field) {\n+\t\t\treturn \"\", &utils.InvalidError{Msg: fmt.Sprintf(\"Unsupported character found in field: %s\", field)}\n+\t\t}","path":"components/nodemanager-service/pgdb/filtering.go","position":26,"original_position":26,"commit_id":"5b235efccee504794d5c5103830fb799dfa3b499","original_commit_id":"5b235efccee504794d5c5103830fb799dfa3b499","user":{"login":"vjeffrey","id":10341541,"node_id":"MDQ6VXNlcjEwMzQxNTQx","avatar_url":"https://avatars3.githubusercontent.com/u/10341541?v=4","gravatar_id":"","url":"https://api.github.com/users/vjeffrey","html_url":"https://github.com/vjeffrey","followers_url":"https://api.github.com/users/vjeffrey/followers","following_url":"https://api.github.com/users/vjeffrey/following{/other_user}","gists_url":"https://api.github.com/users/vjeffrey/gists{/gist_id}","starred_url":"https://api.github.com/users/vjeffrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vjeffrey/subscriptions","organizations_url":"https://api.github.com/users/vjeffrey/orgs","repos_url":"https://api.github.com/users/vjeffrey/repos","events_url":"https://api.github.com/users/vjeffrey/events{/privacy}","received_events_url":"https://api.github.com/users/vjeffrey/received_events","type":"User","site_admin":false},"body":"though i guess that means we need the issqlsafe bit there but elsewhere? hmmm. im not sure.","created_at":"2019-05-15T16:15:38Z","updated_at":"2019-05-15T16:15:38Z","html_url":"https://github.com/chef/automate/pull/332#discussion_r284338322","pull_request_url":"https://api.github.com/repos/chef/automate/pulls/332","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/chef/automate/pulls/comments/284338322"},"html":{"href":"https://github.com/chef/automate/pull/332#discussion_r284338322"},"pull_request":{"href":"https://api.github.com/repos/chef/automate/pulls/332"}},"in_reply_to_id":284048615},"pull_request":{"url":"https://api.github.com/repos/chef/automate/pulls/332","id":278477787,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjc4NDc3Nzg3","html_url":"https://github.com/chef/automate/pull/332","diff_url":"https://github.com/chef/automate/pull/332.diff","patch_url":"https://github.com/chef/automate/pull/332.patch","issue_url":"https://api.github.com/repos/chef/automate/issues/332","number":332,"state":"open","locked":false,"title":"add filtering for last scan and last run data on nodes endpoint","user":{"login":"vjeffrey","id":10341541,"node_id":"MDQ6VXNlcjEwMzQxNTQx","avatar_url":"https://avatars3.githubusercontent.com/u/10341541?v=4","gravatar_id":"","url":"https://api.github.com/users/vjeffrey","html_url":"https://github.com/vjeffrey","followers_url":"https://api.github.com/users/vjeffrey/followers","following_url":"https://api.github.com/users/vjeffrey/following{/other_user}","gists_url":"https://api.github.com/users/vjeffrey/gists{/gist_id}","starred_url":"https://api.github.com/users/vjeffrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vjeffrey/subscriptions","organizations_url":"https://api.github.com/users/vjeffrey/orgs","repos_url":"https://api.github.com/users/vjeffrey/repos","events_url":"https://api.github.com/users/vjeffrey/events{/privacy}","received_events_url":"https://api.github.com/users/vjeffrey/received_events","type":"User","site_admin":false},"body":"### :nut_and_bolt: Description\r\nThis work adds support for filtering by:\r\n - last run and last scan end time ranges\r\n - last run and last scan status\r\n - last run and last scan penultimate status\r\n\r\n### :+1: Definition of Done\r\nable to filter by above defined criteria on the `api/v0/nodes` endpoint\r\nhttps://github.com/chef/automate/issues/192","created_at":"2019-05-14T00:13:40Z","updated_at":"2019-05-15T16:15:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"772bec074ab10bb44c58d5f501b50f778f5bf2bb","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1338422448,"node_id":"MDU6TGFiZWwxMzM4NDIyNDQ4","url":"https://api.github.com/repos/chef/automate/labels/one%20node%20view","name":"one node view","color":"bc205c","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/chef/automate/pulls/332/commits","review_comments_url":"https://api.github.com/repos/chef/automate/pulls/332/comments","review_comment_url":"https://api.github.com/repos/chef/automate/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chef/automate/issues/332/comments","statuses_url":"https://api.github.com/repos/chef/automate/statuses/5b235efccee504794d5c5103830fb799dfa3b499","head":{"label":"chef:vj/nodes-filter-fields","ref":"vj/nodes-filter-fields","sha":"5b235efccee504794d5c5103830fb799dfa3b499","user":{"login":"chef","id":29740,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NzQw","avatar_url":"https://avatars3.githubusercontent.com/u/29740?v=4","gravatar_id":"","url":"https://api.github.com/users/chef","html_url":"https://github.com/chef","followers_url":"https://api.github.com/users/chef/followers","following_url":"https://api.github.com/users/chef/following{/other_user}","gists_url":"https://api.github.com/users/chef/gists{/gist_id}","starred_url":"https://api.github.com/users/chef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chef/subscriptions","organizations_url":"https://api.github.com/users/chef/orgs","repos_url":"https://api.github.com/users/chef/repos","events_url":"https://api.github.com/users/chef/events{/privacy}","received_events_url":"https://api.github.com/users/chef/received_events","type":"Organization","site_admin":false},"repo":{"id":179318179,"node_id":"MDEwOlJlcG9zaXRvcnkxNzkzMTgxNzk=","name":"automate","full_name":"chef/automate","private":false,"owner":{"login":"chef","id":29740,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NzQw","avatar_url":"https://avatars3.githubusercontent.com/u/29740?v=4","gravatar_id":"","url":"https://api.github.com/users/chef","html_url":"https://github.com/chef","followers_url":"https://api.github.com/users/chef/followers","following_url":"https://api.github.com/users/chef/following{/other_user}","gists_url":"https://api.github.com/users/chef/gists{/gist_id}","starred_url":"https://api.github.com/users/chef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chef/subscriptions","organizations_url":"https://api.github.com/users/chef/orgs","repos_url":"https://api.github.com/users/chef/repos","events_url":"https://api.github.com/users/chef/events{/privacy}","received_events_url":"https://api.github.com/users/chef/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/chef/automate","description":"Chef Automate","fork":false,"url":"https://api.github.com/repos/chef/automate","forks_url":"https://api.github.com/repos/chef/automate/forks","keys_url":"https://api.github.com/repos/chef/automate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chef/automate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chef/automate/teams","hooks_url":"https://api.github.com/repos/chef/automate/hooks","issue_events_url":"https://api.github.com/repos/chef/automate/issues/events{/number}","events_url":"https://api.github.com/repos/chef/automate/events","assignees_url":"https://api.github.com/repos/chef/automate/assignees{/user}","branches_url":"https://api.github.com/repos/chef/automate/branches{/branch}","tags_url":"https://api.github.com/repos/chef/automate/tags","blobs_url":"https://api.github.com/repos/chef/automate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chef/automate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chef/automate/git/refs{/sha}","trees_url":"https://api.github.com/repos/chef/automate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chef/automate/statuses/{sha}","languages_url":"https://api.github.com/repos/chef/automate/languages","stargazers_url":"https://api.github.com/repos/chef/automate/stargazers","contributors_url":"https://api.github.com/repos/chef/automate/contributors","subscribers_url":"https://api.github.com/repos/chef/automate/subscribers","subscription_url":"https://api.github.com/repos/chef/automate/subscription","commits_url":"https://api.github.com/repos/chef/automate/commits{/sha}","git_commits_url":"https://api.github.com/repos/chef/automate/git/commits{/sha}","comments_url":"https://api.github.com/repos/chef/automate/comments{/number}","issue_comment_url":"https://api.github.com/repos/chef/automate/issues/comments{/number}","contents_url":"https://api.github.com/repos/chef/automate/contents/{+path}","compare_url":"https://api.github.com/repos/chef/automate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chef/automate/merges","archive_url":"https://api.github.com/repos/chef/automate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chef/automate/downloads","issues_url":"https://api.github.com/repos/chef/automate/issues{/number}","pulls_url":"https://api.github.com/repos/chef/automate/pulls{/number}","milestones_url":"https://api.github.com/repos/chef/automate/milestones{/number}","notifications_url":"https://api.github.com/repos/chef/automate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chef/automate/labels{/name}","releases_url":"https://api.github.com/repos/chef/automate/releases{/id}","deployments_url":"https://api.github.com/repos/chef/automate/deployments","created_at":"2019-04-03T15:26:38Z","updated_at":"2019-05-15T15:23:05Z","pushed_at":"2019-05-15T16:15:22Z","git_url":"git://github.com/chef/automate.git","ssh_url":"git@github.com:chef/automate.git","clone_url":"https://github.com/chef/automate.git","svn_url":"https://github.com/chef/automate","homepage":"https://automate.chef.io/","size":66458,"stargazers_count":49,"watchers_count":49,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":108,"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":9,"open_issues":108,"watchers":49,"default_branch":"master"}},"base":{"label":"chef:master","ref":"master","sha":"64ca31ed00ca5723c3d86eaf694379da9ac3acba","user":{"login":"chef","id":29740,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NzQw","avatar_url":"https://avatars3.githubusercontent.com/u/29740?v=4","gravatar_id":"","url":"https://api.github.com/users/chef","html_url":"https://github.com/chef","followers_url":"https://api.github.com/users/chef/followers","following_url":"https://api.github.com/users/chef/following{/other_user}","gists_url":"https://api.github.com/users/chef/gists{/gist_id}","starred_url":"https://api.github.com/users/chef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chef/subscriptions","organizations_url":"https://api.github.com/users/chef/orgs","repos_url":"https://api.github.com/users/chef/repos","events_url":"https://api.github.com/users/chef/events{/privacy}","received_events_url":"https://api.github.com/users/chef/received_events","type":"Organization","site_admin":false},"repo":{"id":179318179,"node_id":"MDEwOlJlcG9zaXRvcnkxNzkzMTgxNzk=","name":"automate","full_name":"chef/automate","private":false,"owner":{"login":"chef","id":29740,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NzQw","avatar_url":"https://avatars3.githubusercontent.com/u/29740?v=4","gravatar_id":"","url":"https://api.github.com/users/chef","html_url":"https://github.com/chef","followers_url":"https://api.github.com/users/chef/followers","following_url":"https://api.github.com/users/chef/following{/other_user}","gists_url":"https://api.github.com/users/chef/gists{/gist_id}","starred_url":"https://api.github.com/users/chef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chef/subscriptions","organizations_url":"https://api.github.com/users/chef/orgs","repos_url":"https://api.github.com/users/chef/repos","events_url":"https://api.github.com/users/chef/events{/privacy}","received_events_url":"https://api.github.com/users/chef/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/chef/automate","description":"Chef Automate","fork":false,"url":"https://api.github.com/repos/chef/automate","forks_url":"https://api.github.com/repos/chef/automate/forks","keys_url":"https://api.github.com/repos/chef/automate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chef/automate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chef/automate/teams","hooks_url":"https://api.github.com/repos/chef/automate/hooks","issue_events_url":"https://api.github.com/repos/chef/automate/issues/events{/number}","events_url":"https://api.github.com/repos/chef/automate/events","assignees_url":"https://api.github.com/repos/chef/automate/assignees{/user}","branches_url":"https://api.github.com/repos/chef/automate/branches{/branch}","tags_url":"https://api.github.com/repos/chef/automate/tags","blobs_url":"https://api.github.com/repos/chef/automate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chef/automate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chef/automate/git/refs{/sha}","trees_url":"https://api.github.com/repos/chef/automate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chef/automate/statuses/{sha}","languages_url":"https://api.github.com/repos/chef/automate/languages","stargazers_url":"https://api.github.com/repos/chef/automate/stargazers","contributors_url":"https://api.github.com/repos/chef/automate/contributors","subscribers_url":"https://api.github.com/repos/chef/automate/subscribers","subscription_url":"https://api.github.com/repos/chef/automate/subscription","commits_url":"https://api.github.com/repos/chef/automate/commits{/sha}","git_commits_url":"https://api.github.com/repos/chef/automate/git/commits{/sha}","comments_url":"https://api.github.com/repos/chef/automate/comments{/number}","issue_comment_url":"https://api.github.com/repos/chef/automate/issues/comments{/number}","contents_url":"https://api.github.com/repos/chef/automate/contents/{+path}","compare_url":"https://api.github.com/repos/chef/automate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chef/automate/merges","archive_url":"https://api.github.com/repos/chef/automate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chef/automate/downloads","issues_url":"https://api.github.com/repos/chef/automate/issues{/number}","pulls_url":"https://api.github.com/repos/chef/automate/pulls{/number}","milestones_url":"https://api.github.com/repos/chef/automate/milestones{/number}","notifications_url":"https://api.github.com/repos/chef/automate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chef/automate/labels{/name}","releases_url":"https://api.github.com/repos/chef/automate/releases{/id}","deployments_url":"https://api.github.com/repos/chef/automate/deployments","created_at":"2019-04-03T15:26:38Z","updated_at":"2019-05-15T15:23:05Z","pushed_at":"2019-05-15T16:15:22Z","git_url":"git://github.com/chef/automate.git","ssh_url":"git@github.com:chef/automate.git","clone_url":"https://github.com/chef/automate.git","svn_url":"https://github.com/chef/automate","homepage":"https://automate.chef.io/","size":66458,"stargazers_count":49,"watchers_count":49,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":108,"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":9,"open_issues":108,"watchers":49,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chef/automate/pulls/332"},"html":{"href":"https://github.com/chef/automate/pull/332"},"issue":{"href":"https://api.github.com/repos/chef/automate/issues/332"},"comments":{"href":"https://api.github.com/repos/chef/automate/issues/332/comments"},"review_comments":{"href":"https://api.github.com/repos/chef/automate/pulls/332/comments"},"review_comment":{"href":"https://api.github.com/repos/chef/automate/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chef/automate/pulls/332/commits"},"statuses":{"href":"https://api.github.com/repos/chef/automate/statuses/5b235efccee504794d5c5103830fb799dfa3b499"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"vjeffrey"}}