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

profile fails inspec check #101

Closed
vjeffrey opened this issue Mar 23, 2018 · 3 comments
Closed

profile fails inspec check #101

vjeffrey opened this issue Mar 23, 2018 · 3 comments

Comments

@vjeffrey
Copy link

DEBU[0018] TimeTrack: CheckProfile took 2.927394444s
ERRO[0018] Create CheckProfile error: Check InSpec check failed for api/tests/profiles/.tmp/inspec-upload915206091.tar.gz with message: exit status 1
WARN: Unresolved specs during Gem::Specification.reset:
      ffi (>= 1.0.1)
      docker-api (~> 1.26)
      unf_ext (>= 0)
      public_suffix (< 4.0, >= 2.0.2)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/inspec-2.1.10/lib/utils/file_reader.rb:11:in `read_file_content': Can't find file: /etc/ssh/sshd_config (Inspec::Exceptions::ResourceSkipped)
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/inspec-2.1.10/lib/resources/ssh_conf.rb:64:in `read_content'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/inspec-2.1.10/lib/resources/ssh_conf.rb:69:in `read_params'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/inspec-2.1.10/lib/resources/ssh_conf.rb:48:in `method_missing'
    from ssh-baseline-2.1.1/controls/sshd_spec.rb:476:in `block in load_with_context'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/inspec-2.1.10/lib/inspec/rule.rb:50:in `instance_eval'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/inspec-2.1.10/lib/inspec/rule.rb:50:in `initialize'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/inspec-2.1.10/lib/inspec/control_eval_context.rb:75:in `new'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/inspec-2.1.10/lib/inspec/control_eval_context.rb:75:in `block (2 levels) in create'
    from ssh-baseline-2.1.1/controls/sshd_spec.rb:466:in `load_with_context'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/inspec-2.1.10/lib/inspec/profile_context.rb:157:in `instance_eval'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/inspec-2.1.10/lib/inspec/profile_context.rb:157:in `load_with_context'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/inspec-2.1.10/lib/inspec/profile_context.rb:141:in `load_control_file'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/inspec-2.1.10/lib/inspec/profile.rb:167:in `block in collect_tests'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/inspec-2.1.10/lib/inspec/profile.rb:164:in `each'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/inspec-2.1.10/lib/inspec/profile.rb:164:in `collect_tests'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/inspec-2.1.10/lib/inspec/profile.rb:470:in `load_checks_params'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/inspec-2.1.10/lib/inspec/profile.rb:463:in `load_params'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/inspec-2.1.10/lib/inspec/profile.rb:157:in `params'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/inspec-2.1.10/lib/inspec/profile.rb:323:in `controls_count'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/inspec-2.1.10/lib/inspec/profile.rb:294:in `check'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/inspec-2.1.10/lib/inspec/cli.rb:76:in `check'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/gems/inspec-2.1.10/bin/inspec:12:in `<top (required)>'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/bin/inspec:23:in `load'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/bin/inspec:23:in `<main>'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in `eval'
    from /Users/vjeffrey/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in `<main>'
@vjeffrey
Copy link
Author

This apparently used to fail silently; the latest inspec release uncovered the bug.

@artem-sidorenko
Copy link
Member

@vjeffrey thanks for this issue! Do you have any details how this can be reproduced?

@vjeffrey
Copy link
Author

vjeffrey commented Aug 2, 2018

looks like it's fixed in latest:

[ec2-user@ip-172-31-29-219 ~]$ inspec -v
2.2.50
[ec2-user@ip-172-31-29-219 ~]$ inspec check https://github.com/dev-sec/ssh-baseline
[2018-08-02T16:52:17+00:00] WARN: URL target https://github.com/dev-sec/ssh-baseline transformed to https://github.com/dev-sec/ssh-baseline/archive/master.tar.gz. Consider using the git fetcher
Location:    https://github.com/dev-sec/ssh-baseline
Profile:     ssh-baseline
Controls:    68
Timestamp:   2018-08-02T16:52:18+00:00
Valid:       true

No errors or warnings

@vjeffrey vjeffrey closed this as completed Aug 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants