Hide Forgot
Description of problem: foreman_scap_client with invalid policy id raise an exception. #foreman_scap_client 1 <-- invalid id /usr/share/gems/gems/foreman_scap_client-0.1.2/lib/foreman_scap_client/client.rb:129:in `ensure_scan_file': undefined method `[]' for nil:NilClass (NoMethodError) from /usr/share/gems/gems/foreman_scap_client-0.1.2/lib/foreman_scap_client/client.rb:15:in `run' from /usr/share/gems/gems/foreman_scap_client-0.1.2/bin/foreman_scap_client:10:in `<top (required)>' from /usr/bin/foreman_scap_client:23:in `load' from /usr/bin/foreman_scap_client:23:in `<main>' Version-Release number of selected component (if applicable): Satellite 6.2
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16402 has been resolved.
VERIFIED Version Tested: Satellite-6.3 Snap 12 Steps: 1. Applied policy on host 2. On host, run foreman_scap_client <invalid_id> cat /etc/foreman_scap_client/config.yaml >>> # DO NOT EDIT THIS FILE MANUALLY # IT IS MANAGED BY PUPPET # Foreman proxy to which reports should be uploaded :server: '' :port: 9090 ## SSL specific options ## # Client CA file. # It could be Puppet CA certificate (e.g., '/var/lib/puppet/ssl/certs/ca.pem') # Or (recommended for client reporting to Katello) subscription manager CA file, (e.g., '/etc/rhsm/ca/katello-server-ca.pem') :ca_file: '/etc/rhsm/ca/katello-server-ca.pem' # Client host certificate. # It could be Puppet agent host certificate (e.g., '/var/lib/puppet/ssl/certs/myhost.example.com.pem') # Or (recommended for client reporting to Katello) consumer certificate (e.g., '/etc/pki/consumer/cert.pem') :host_certificate: '/etc/pki/consumer/cert.pem' # Client private key # It could be Puppet agent private key (e.g., '/var/lib/puppet/ssl/private_keys/myhost.example.com.pem') # Or (recommended for client reporting to Katello) consumer private key (e.g., '/etc/pki/consumer/key.pem') :host_private_key: '/etc/pki/consumer/key.pem' # policy (key is id as in Foreman) 1: :profile: 'xccdf_org.ssgproject.content_profile_common' :content_path: '/var/lib/openscap/content/96c2a9d5278d5da905221bbb2dc61d0ace7ee3d97f021fccac994d26296d986d.xml' # Download path # A path to download SCAP content from proxy :download_path: '/compliance/policies/1/content/96c2a9d5278d5da905221bbb2dc61d0ace7ee3d97f021fccac994d26296d986d' :tailoring_path: '' :tailoring_download_path: '' foreman_scap_client 3 >>> Policy id 3 not found. Successfully shows the error as policy id not found.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. > > For information on the advisory, and where to find the updated files, follow the link below. > > If the solution does not work for you, open a new bug report. > > https://access.redhat.com/errata/RHSA-2018:0336