{"action":"opened","issue":{"url":"https://api.github.com/repos/kynrai/tainted/issues/2","repository_url":"https://api.github.com/repos/kynrai/tainted","labels_url":"https://api.github.com/repos/kynrai/tainted/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/kynrai/tainted/issues/2/comments","events_url":"https://api.github.com/repos/kynrai/tainted/issues/2/events","html_url":"https://github.com/kynrai/tainted/issues/2","id":335653542,"node_id":"MDU6SXNzdWUzMzU2NTM1NDI=","number":2,"title":"Root package changes not being considered for tainting","user":{"login":"TomDeVito","id":2437249,"node_id":"MDQ6VXNlcjI0MzcyNDk=","avatar_url":"https://avatars2.githubusercontent.com/u/2437249?v=4","gravatar_id":"","url":"https://api.github.com/users/TomDeVito","html_url":"https://github.com/TomDeVito","followers_url":"https://api.github.com/users/TomDeVito/followers","following_url":"https://api.github.com/users/TomDeVito/following{/other_user}","gists_url":"https://api.github.com/users/TomDeVito/gists{/gist_id}","starred_url":"https://api.github.com/users/TomDeVito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomDeVito/subscriptions","organizations_url":"https://api.github.com/users/TomDeVito/orgs","repos_url":"https://api.github.com/users/TomDeVito/repos","events_url":"https://api.github.com/users/TomDeVito/events{/privacy}","received_events_url":"https://api.github.com/users/TomDeVito/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-26T04:20:09Z","updated_at":"2018-06-26T04:20:09Z","closed_at":null,"author_association":"NONE","body":"Hey, thanks for making this tool,  I ran into a little snag:\r\n\r\nIf I have the following structure:\r\n```\r\ncmd/\r\n    app1/\r\n        main.go     <- imports package project\r\n    app2/\r\n         main.go\r\nproject.go          <-  package name:  project\r\n\r\n```\r\nand I make changes to `project.go`, `app1` and `app2` are not considered to be tainted.  `project.go` is in the CWD, but seems to be [ignored here](https://github.com/kynrai/tainted/blob/master/main.go#L142)\r\n\r\nWhen I change the code to the following:  \r\n```\r\nif dir := filepath.Dir(scanner.Text()); dir != \".\" {\r\n\tchangedDirs[dir] = struct{}{}\r\n} else {\r\n\tctx := build.Default\r\n\tcwd, err := os.Getwd()\r\n\tif err != nil {\r\n\t\tlog.Fatal(err)\r\n\t}\r\n\tp, err := ctx.ImportDir(cwd, build.FindOnly)\r\n\tif err != nil {\r\n\t\tlog.Fatal(err)\r\n\t}\r\n\tchangedDirs[p.ImportPath] = struct{}{}\r\n}\r\n```\r\nI seem to get my desired outcome.  I'm not sure if this the best way to handle this or not and was wondering what your thoughts are about this matter.\r\n\r\nThanks,"}}
{"actor":{"display_login":"TomDeVito"}}