{"action":"created","issue":{"url":"https://api.github.com/repos/CISOfy/lynis/issues/338","repository_url":"https://api.github.com/repos/CISOfy/lynis","labels_url":"https://api.github.com/repos/CISOfy/lynis/issues/338/labels{/name}","comments_url":"https://api.github.com/repos/CISOfy/lynis/issues/338/comments","events_url":"https://api.github.com/repos/CISOfy/lynis/issues/338/events","html_url":"https://github.com/CISOfy/lynis/issues/338","id":195653551,"number":338,"title":"'cat' Binary Not Being Found?","user":{"login":"quantumpacket","id":8516784,"avatar_url":"https://avatars.githubusercontent.com/u/8516784?v=3","gravatar_id":"","url":"https://api.github.com/users/quantumpacket","html_url":"https://github.com/quantumpacket","followers_url":"https://api.github.com/users/quantumpacket/followers","following_url":"https://api.github.com/users/quantumpacket/following{/other_user}","gists_url":"https://api.github.com/users/quantumpacket/gists{/gist_id}","starred_url":"https://api.github.com/users/quantumpacket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quantumpacket/subscriptions","organizations_url":"https://api.github.com/users/quantumpacket/orgs","repos_url":"https://api.github.com/users/quantumpacket/repos","events_url":"https://api.github.com/users/quantumpacket/events{/privacy}","received_events_url":"https://api.github.com/users/quantumpacket/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-14T21:41:26Z","updated_at":"2016-12-15T00:50:26Z","closed_at":null,"body":"I was having issues with the AppArmor tests and narrowed it down to it not being able to pass the file check on this line [tests_mac_frameworks#L56](https://github.com/CISOfy/lynis/blob/master/include/tests_mac_frameworks#L56). The file does exist and can be read, and I am able to use `cat` on it just fine. So I edited the tests file and echoed `${CAT_BINARY}` right before the point of failure, only to have it output an empty string. Which explains why the statement kept producing the wrong status code. Yes, this is all being done as root.\r\n\r\nI checked my log file, and **did not** find the following as I would expect:\r\n> Found known binary: cat (generic file handling)\r\n\r\nIt appears `cat` is not being detected and the path is defaulting to empty. The system this is being tested on is *Ubuntu Server 16.04* and I'm using *Lynis 2.4.0* and the path to my binary is `/bin/cat`. Which after examining the Lynis code is already a path that is searched, in fact it's the first directory. I'm not sure why the binary detection is failing in this case.\r\n\r\nThis works fine for me.\r\n```sh\r\n/bin/cat /sys/kernel/security/apparmor/profiles\r\n```\r\n\r\nLet me know if there is anything else I need to provide to figure out what is going wrong."},"comment":{"url":"https://api.github.com/repos/CISOfy/lynis/issues/comments/267203628","html_url":"https://github.com/CISOfy/lynis/issues/338#issuecomment-267203628","issue_url":"https://api.github.com/repos/CISOfy/lynis/issues/338","id":267203628,"user":{"login":"rhyven","id":9939382,"avatar_url":"https://avatars.githubusercontent.com/u/9939382?v=3","gravatar_id":"","url":"https://api.github.com/users/rhyven","html_url":"https://github.com/rhyven","followers_url":"https://api.github.com/users/rhyven/followers","following_url":"https://api.github.com/users/rhyven/following{/other_user}","gists_url":"https://api.github.com/users/rhyven/gists{/gist_id}","starred_url":"https://api.github.com/users/rhyven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhyven/subscriptions","organizations_url":"https://api.github.com/users/rhyven/orgs","repos_url":"https://api.github.com/users/rhyven/repos","events_url":"https://api.github.com/users/rhyven/events{/privacy}","received_events_url":"https://api.github.com/users/rhyven/received_events","type":"User","site_admin":false},"created_at":"2016-12-15T00:50:26Z","updated_at":"2016-12-15T00:50:26Z","body":"Yep if that grep command doesn't return anything, it's a good indication that AppArmor isn't causing the failure.  I do realise your comments weren't about the tests for AppArmor, it's just that some of the profiles are a bit broken, and I've been bitten by them in the past -- resulting in similar weird behaviour  ;-)"}}
{"actor":{"display_login":"rhyven"}}