We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
file().exists
does not work properly with the content below and returns 'false'.
cnspec> file("/Library/Security/PolicyBanner.rtf").content file.content: " {\\rtf1\\ansi\\ansicpg1252\\cocoartf1561\\cocoasubrtf610 {\\fonttbl\\f0\\fswiss\\fcharset0 Helvetica;} {\\colortbl;\\red255\\green255\\blue255;} {\\*\\expandedcolortbl;;} \\margl1440\\margr1440\\vieww10800\\viewh8400\\viewkind0 \\pard\ x566\ x1133\ x1700\ x2267\ x2834\ x3401\ x3968\ x4535\ x5102\ x5669\ x6236\ x6803\\pardirnatural\\partightenfactor0 \\f0\\fs24 \\cf0 Center for Internet Security Test Message}Center for Internet Security Test Message " cnspec> file("/Library/Security/PolicyBanner.rtf").exists [failed] file.exists expected: == true actual: false
To Reproduce Steps to reproduce the behavior:
Create the file above on MacOS 13.6.2 (arm64) and run the command.
Expected behavior The file.exists should return true, regardless of the content.
Screenshots or CLI Output If applicable, add screenshots or the CLI output to help explain your problem.
Desktop (please complete the following information):
macOS, arm64
13.5.2
cnspec 9.5.1 (e8298bf, 2023-11-02T10:07:22Z)
Additional context Did install current providers:
mondoo-testing:Downloads root# ./cnspec_9.5.1 providers install os → installing provider 'os' version=9.1.1 → successfully installed os provider path=/Library/Mondoo/providers/os version=9.1.1
The text was updated successfully, but these errors were encountered:
parse.plist
Seems content doesn't matter:
cnspec> file("/Library/Security/PolicyBanner.txt").exists [failed] file.exists expected: == true actual: false cnspec> file("/Library/Security/PolicyBanner.txt") file: file path="/Library/Security/PolicyBanner.txt" size=42 permissions.string="-rw-r--r--" cnspec> file("/Library/Security/PolicyBanner.txt").content file.content: "Center for Internet Security Test Message "
Sorry, something went wrong.
@mm-weber can you retest with latest cnspec and latest os provider?
Can't repro this issue anymore:
imilchev
No branches or pull requests
Describe the bug
does not work properly with the content below and returns 'false'.
To Reproduce
Steps to reproduce the behavior:
Create the file above on MacOS 13.6.2 (arm64) and run the command.
Expected behavior
The file.exists should return true, regardless of the content.
Screenshots or CLI Output
If applicable, add screenshots or the CLI output to help explain your problem.
Desktop (please complete the following information):
macOS, arm64
13.5.2
Additional context
Did install current providers:
The text was updated successfully, but these errors were encountered: