Skip to content
New issue

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

object: *bytes.Reader in Actual Result #42

Open
jaredpricedev opened this issue Apr 14, 2024 · 2 comments
Open

object: *bytes.Reader in Actual Result #42

jaredpricedev opened this issue Apr 14, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jaredpricedev
Copy link

Describe the Issue
I am getting "object: *bytes.Reader" on several of the items. I found this github thread:
goss-org/goss#845
and it seems to be linked to version of Goss. I did try to run the version listed in the thread but it still had the same result. I have run the command in the goss yaml and it works fine.

Expected Behavior
The actual result would show correctly and have the correct result shown.

Actual Behavior
This is happening in several stig items where the actual is showing "object: *bytes.Reader"

{
            "duration": 112002,
            "end-time": "2024-04-09T00:16:48.792848267Z",
            "err": null,
            "matcher-result": {
                "actual": "object: *bytes.Reader",
                "expected": [
                    "/.*:PermitUserEnvironment [Nn][Oo]/",
                    "!/.*:PermitUserEnvironment\\s+[Yy][Ee][Ss]/"
                ],
                "extra-elements": null,
                "found-elements": [
                    "!/.*:PermitUserEnvironment\\s+[Yy][Ee][Ss]/"
                ],
                "message": "to have patterns",
                "missing-elements": [
                    "/.*:PermitUserEnvironment [Nn][Oo]/"
                ],
                "transform-chain": null,
                "untransformed-value": null
            },
            "meta": {
                "CCI": "CCI-000366",
                "Cat": 2,
                "Group_Title": "SRG-OS-000480-GPOS-00229",
                "Rule_ID": "SV-230330r646870_rule",
                "STIG_ID": "RHEL-08-010830",
                "Vul_ID": "V-230330"
}

Control(s) Affected
Here are a couple of them I am having issues with:
RHEL-08-010830
RHEL-08-030000
RHEL-08-030360
RHEL-08-030740
RHEL-08-030560
many more...
Environment (please complete the following information):

  • branch being used: 3.1.0
  • Ansible Version: 2.14.5
  • Host Python Version: Python 3.6.8
  • Ansible Server Python Version: Python 3.9.16
  • Additional Details:
  • Goss version 0.3.23 and v0.4.4

Additional Notes
Anything additional goes here

Possible Solution
goss-org/goss#845

@jaredpricedev jaredpricedev added the bug Something isn't working label Apr 14, 2024
@uk-bolly
Copy link
Member

hi @jaredpricedev

Thank you for raising the issue, there are some very very big changes between goss versions, which means it will only run with some versions correctly.
You should be running goss v0.4.4 or greater according to the tag you are referring to from the remediation repository.
This will probalny not run at all well on anything lower due to the changes.

If you could confirm the value of
PermitUserEnvironment in your /etc/ssh/sshd_config file as well.

Many thanks

uk-bolly

@uk-bolly
Copy link
Member

uk-bolly commented Jun 6, 2024

hi @jaredpricedev

There has been a few updates to some of the benchmark branches now and to the remediation itself.. Could you let me know if this resolved your issues?

many thanks

uk-bolly

@uk-bolly uk-bolly self-assigned this Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants