{"id":18256515,"url":"https://github.com/openscap/openscap_parser","last_synced_at":"2025-04-04T18:30:27.585Z","repository":{"id":42624357,"uuid":"189207079","full_name":"OpenSCAP/openscap_parser","owner":"OpenSCAP","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-26T21:08:34.000Z","size":6725,"stargazers_count":7,"open_issues_count":4,"forks_count":14,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-31T13:56:24.743Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenSCAP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-29T10:51:46.000Z","updated_at":"2024-08-12T19:49:25.000Z","dependencies_parsed_at":"2023-01-27T19:46:10.025Z","dependency_job_id":null,"html_url":"https://github.com/OpenSCAP/openscap_parser","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenSCAP%2Fopenscap_parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenSCAP%2Fopenscap_parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenSCAP%2Fopenscap_parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenSCAP%2Fopenscap_parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenSCAP","download_url":"https://codeload.github.com/OpenSCAP/openscap_parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223151775,"owners_count":17096175,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T10:22:24.304Z","updated_at":"2024-11-05T10:22:25.634Z","avatar_url":"https://github.com/OpenSCAP.png","language":"Ruby","readme":"# OpenscapParser\n\nWelcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/openscap_parser`. To experiment with that code, run `bin/console` for an interactive prompt.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'openscap_parser'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install openscap_parser\n\n## Usage\n\nARF/XCCDF report goes IN - Ruby hash goes OUT\n\n```rb\nparser = OpenscapParser::Base.new(File.read('rhel7-xccdf_org.ssgproject.content_profile_standard.xml'))\nparser.host # \"rhel7-insights-client.virbr0.akofink-laptop\"\nparser.start_time # \u003cDateTime: 2019-08-08T17:25:50+00:00 ((2458704j,62750s,0n),+0s,2299161j)\u003e\nparser.end_time # \u003cDateTime: 2019-08-08T17:26:45+00:00 ((2458704j,62805s,0n),+0s,2299161j)\u003e\nparser.score # 80.833328\nparser.profiles # {\"xccdf_org.ssgproject.content_profile_standard\"=\u003e\"Standard System Security Profile for Red Hat Enterprise Linux 7\"}\nparser.rules # [#\u003cOpenscapParser::Rule:0x00005576e752db7 ... \u003e, ...]\nparser.rule_results # [#\u003cOpenscapParser::RuleResult:0x00005576e8022f60 @id=\"xccdf_org.ssgproject.content_rule_package_rsh_removed\", @result=\"notselected\"\u003e, ...]\n\n# and more!\n```\n\n### Fetching SCAP Security Guide Content\n\nThis gem includes a rake task to sync content from the [ComplianceAsCode project](https://github.com/ComplianceAsCode/content). The following examples show how to download and exract datastream files from the released versions:\n\n```sh\nrake ssg:sync DATASTREAMS=latest:fedora # fetch and extract the latest fedora datastream\nrake ssg:sync DATASTREAMS=v0.1.45:fedora,v0.1.45:firefox # fetch and extract tag v0.1.45 for fedora and firefox datastreams\nrake ssg:sync_rhel # fetch and extract the latest released versions of the RHEL 6, 7, and 8 datastreams\n```\n\nAn SSG version will be downloaded only once, even if it is specified multiple times for multiple datastreams.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/elobato/openscap_parser. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the OpenscapParser project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/elobato/openscap_parser/blob/master/CODE_OF_CONDUCT.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenscap%2Fopenscap_parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenscap%2Fopenscap_parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenscap%2Fopenscap_parser/lists"}