{"action":"created","issue":{"url":"https://api.github.com/repos/witheve/Eve/issues/657","repository_url":"https://api.github.com/repos/witheve/Eve","labels_url":"https://api.github.com/repos/witheve/Eve/issues/657/labels{/name}","comments_url":"https://api.github.com/repos/witheve/Eve/issues/657/comments","events_url":"https://api.github.com/repos/witheve/Eve/issues/657/events","html_url":"https://github.com/witheve/Eve/pull/657","id":193867617,"number":657,"title":"Fix stratification when joining aggregate results with other scans","user":{"login":"ibdknox","id":70036,"avatar_url":"https://avatars.githubusercontent.com/u/70036?v=3","gravatar_id":"","url":"https://api.github.com/users/ibdknox","html_url":"https://github.com/ibdknox","followers_url":"https://api.github.com/users/ibdknox/followers","following_url":"https://api.github.com/users/ibdknox/following{/other_user}","gists_url":"https://api.github.com/users/ibdknox/gists{/gist_id}","starred_url":"https://api.github.com/users/ibdknox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibdknox/subscriptions","organizations_url":"https://api.github.com/users/ibdknox/orgs","repos_url":"https://api.github.com/users/ibdknox/repos","events_url":"https://api.github.com/users/ibdknox/events{/privacy}","received_events_url":"https://api.github.com/users/ibdknox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"joshuafcole","id":313870,"avatar_url":"https://avatars.githubusercontent.com/u/313870?v=3","gravatar_id":"","url":"https://api.github.com/users/joshuafcole","html_url":"https://github.com/joshuafcole","followers_url":"https://api.github.com/users/joshuafcole/followers","following_url":"https://api.github.com/users/joshuafcole/following{/other_user}","gists_url":"https://api.github.com/users/joshuafcole/gists{/gist_id}","starred_url":"https://api.github.com/users/joshuafcole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshuafcole/subscriptions","organizations_url":"https://api.github.com/users/joshuafcole/orgs","repos_url":"https://api.github.com/users/joshuafcole/repos","events_url":"https://api.github.com/users/joshuafcole/events{/privacy}","received_events_url":"https://api.github.com/users/joshuafcole/received_events","type":"User","site_admin":false},"assignees":[{"login":"joshuafcole","id":313870,"avatar_url":"https://avatars.githubusercontent.com/u/313870?v=3","gravatar_id":"","url":"https://api.github.com/users/joshuafcole","html_url":"https://github.com/joshuafcole","followers_url":"https://api.github.com/users/joshuafcole/followers","following_url":"https://api.github.com/users/joshuafcole/following{/other_user}","gists_url":"https://api.github.com/users/joshuafcole/gists{/gist_id}","starred_url":"https://api.github.com/users/joshuafcole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshuafcole/subscriptions","organizations_url":"https://api.github.com/users/joshuafcole/orgs","repos_url":"https://api.github.com/users/joshuafcole/repos","events_url":"https://api.github.com/users/joshuafcole/events{/privacy}","received_events_url":"https://api.github.com/users/joshuafcole/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-12-06T19:50:33Z","updated_at":"2016-12-06T20:39:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/witheve/Eve/pulls/657","html_url":"https://github.com/witheve/Eve/pull/657","diff_url":"https://github.com/witheve/Eve/pull/657.diff","patch_url":"https://github.com/witheve/Eve/pull/657.patch"},"body":"The issue in #649 was caused by a set of issues. First, the maybeLevel function had bugs in it that caused us to look at the wrong scan to determine the minimum level for a variable. Second, we were automatically setting the returns of an aggregate to the same level as the aggregate itself, which is incorrect in the case where there are other providers for a variable (e.g. a database scan).\r\n\r\nTo fix this, I fixed the bugs in maybeLevel and then instead of blanket setting all returns of aggs to the aggs' level, I do a pass to check for the minimum level that could provide that var and set it to that.\r\n\r\nFixes #649."},"comment":{"url":"https://api.github.com/repos/witheve/Eve/issues/comments/265265692","html_url":"https://github.com/witheve/Eve/pull/657#issuecomment-265265692","issue_url":"https://api.github.com/repos/witheve/Eve/issues/657","id":265265692,"user":{"login":"joshuafcole","id":313870,"avatar_url":"https://avatars.githubusercontent.com/u/313870?v=3","gravatar_id":"","url":"https://api.github.com/users/joshuafcole","html_url":"https://github.com/joshuafcole","followers_url":"https://api.github.com/users/joshuafcole/followers","following_url":"https://api.github.com/users/joshuafcole/following{/other_user}","gists_url":"https://api.github.com/users/joshuafcole/gists{/gist_id}","starred_url":"https://api.github.com/users/joshuafcole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshuafcole/subscriptions","organizations_url":"https://api.github.com/users/joshuafcole/orgs","repos_url":"https://api.github.com/users/joshuafcole/repos","events_url":"https://api.github.com/users/joshuafcole/events{/privacy}","received_events_url":"https://api.github.com/users/joshuafcole/received_events","type":"User","site_admin":false},"created_at":"2016-12-06T20:39:30Z","updated_at":"2016-12-06T20:39:30Z","body":"One example this may break is:\r\n\r\n``` eve\r\n\r\n[#foo a]\r\n[#bar b]\r\n\r\na = count[given: b]\r\nfinal = sum[value: a]\r\n\r\n```\r\n\r\nThe count aggregate should be on level 1 and the sum aggregate should be on level 2 to match expectations, but using the maximum min level of all input variables will put them both on level 1."}}
{"actor":{"display_login":"joshuafcole"}}