foreman_openscap 4.1.3 → 4.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/foreman_openscap/policy.css +5 -0
  3. data/app/controllers/api/v2/compliance/oval_contents_controller.rb +72 -0
  4. data/app/controllers/api/v2/compliance/oval_policies_controller.rb +111 -0
  5. data/app/controllers/api/v2/compliance/oval_reports_controller.rb +47 -0
  6. data/app/controllers/concerns/foreman/controller/parameters/oval_content.rb +22 -0
  7. data/app/controllers/concerns/foreman/controller/parameters/oval_policy.rb +22 -0
  8. data/app/controllers/concerns/foreman_openscap/hosts_controller_extensions.rb +1 -1
  9. data/app/graphql/types/cve.rb +17 -0
  10. data/app/graphql/types/oval_content.rb +17 -0
  11. data/app/graphql/types/oval_policy.rb +21 -0
  12. data/app/helpers/arf_reports_helper.rb +7 -24
  13. data/app/helpers/policies_helper.rb +4 -17
  14. data/app/mailers/foreman_openscap/policy_mailer.rb +2 -2
  15. data/app/models/concerns/foreman_openscap/compliance_status_scoped_search.rb +1 -1
  16. data/app/models/concerns/foreman_openscap/data_stream_content.rb +0 -17
  17. data/app/models/concerns/foreman_openscap/host_extensions.rb +11 -11
  18. data/app/models/concerns/foreman_openscap/hostgroup_extensions.rb +3 -5
  19. data/app/models/concerns/foreman_openscap/inherited_policies.rb +11 -0
  20. data/app/models/concerns/foreman_openscap/oval_facet_host_extensions.rb +38 -0
  21. data/app/models/concerns/foreman_openscap/oval_facet_hostgroup_extensions.rb +15 -0
  22. data/app/models/concerns/foreman_openscap/policy_common.rb +75 -0
  23. data/app/models/concerns/foreman_openscap/scap_file_content.rb +24 -0
  24. data/app/models/foreman_openscap/arf_report.rb +2 -2
  25. data/app/models/foreman_openscap/cve.rb +23 -0
  26. data/app/models/foreman_openscap/host/oval_facet.rb +14 -0
  27. data/app/models/foreman_openscap/host_cve.rb +7 -0
  28. data/app/models/foreman_openscap/hostgroup/oval_facet.rb +14 -0
  29. data/app/models/foreman_openscap/hostgroup_oval_facet_oval_policy.rb +6 -0
  30. data/app/models/foreman_openscap/oval_content.rb +26 -0
  31. data/app/models/foreman_openscap/oval_facet_oval_policy.rb +6 -0
  32. data/app/models/foreman_openscap/oval_policy.rb +54 -0
  33. data/app/models/foreman_openscap/oval_status.rb +45 -0
  34. data/app/models/foreman_openscap/policy.rb +10 -73
  35. data/app/models/foreman_openscap/scap_content.rb +1 -0
  36. data/app/models/foreman_openscap/tailoring_file.rb +1 -0
  37. data/app/services/foreman_openscap/client_config/ansible.rb +39 -6
  38. data/app/services/foreman_openscap/client_config/base.rb +5 -1
  39. data/app/services/foreman_openscap/client_config/puppet.rb +2 -1
  40. data/app/services/foreman_openscap/config_name_service.rb +1 -1
  41. data/app/services/foreman_openscap/hostgroup_overrider.rb +2 -24
  42. data/app/services/foreman_openscap/hostgroup_overrider_common.rb +28 -0
  43. data/app/services/foreman_openscap/lookup_key_overrider.rb +30 -62
  44. data/app/services/foreman_openscap/lookup_key_overrides_common.rb +63 -0
  45. data/app/services/foreman_openscap/oval/check_collection.rb +45 -0
  46. data/app/services/foreman_openscap/oval/configure.rb +80 -0
  47. data/app/services/foreman_openscap/oval/cves.rb +41 -0
  48. data/app/services/foreman_openscap/oval/setup.rb +93 -0
  49. data/app/services/foreman_openscap/oval/setup_check.rb +55 -0
  50. data/app/services/foreman_openscap/oval/sync_oval_contents.rb +42 -0
  51. data/app/views/api/v2/compliance/oval_contents/base.json.rabl +6 -0
  52. data/app/views/api/v2/compliance/oval_contents/create.json.rabl +3 -0
  53. data/app/views/api/v2/compliance/oval_contents/destroy.json.rabl +3 -0
  54. data/app/views/api/v2/compliance/oval_contents/index.json.rabl +3 -0
  55. data/app/views/api/v2/compliance/oval_contents/show.json.rabl +3 -0
  56. data/app/views/api/v2/compliance/oval_contents/sync.json.rabl +3 -0
  57. data/app/views/api/v2/compliance/oval_contents/sync_result.json.rabl +11 -0
  58. data/app/views/api/v2/compliance/oval_contents/update.json.rabl +3 -0
  59. data/app/views/api/v2/compliance/oval_policies/create.json.rabl +3 -0
  60. data/app/views/api/v2/compliance/oval_policies/index.json.rabl +3 -0
  61. data/app/views/api/v2/compliance/oval_policies/main.json.rabl +15 -0
  62. data/app/views/api/v2/compliance/oval_policies/show.json.rabl +3 -0
  63. data/app/views/api/v2/compliance/policies/base.json.rabl +2 -2
  64. data/app/views/api/v2/compliance/policies_common/_attrs.json.rabl +2 -0
  65. data/app/views/arf_reports/_output.html.erb +9 -1
  66. data/app/views/arf_reports/show.html.erb +1 -1
  67. data/app/views/arf_reports/show_html.html.erb +1 -0
  68. data/app/views/compliance_hosts/show.html.erb +1 -8
  69. data/app/views/job_templates/run_oval_scans.erb +24 -0
  70. data/app/views/policies/edit.html.erb +3 -2
  71. data/app/views/policies/show.html.erb +3 -1
  72. data/app/views/policies/steps/_deployment_options_form.html.erb +2 -2
  73. data/app/views/scap_contents/edit.html.erb +2 -12
  74. data/app/views/tailoring_files/edit.html.erb +2 -10
  75. data/config/initializers/inflections.rb +12 -0
  76. data/config/routes.rb +19 -0
  77. data/db/migrate/20201019074925_create_oval_policy.rb +13 -0
  78. data/db/migrate/20201020113801_create_oval_facet.rb +14 -0
  79. data/db/migrate/20201021084109_create_hostgroup_oval_facet.rb +14 -0
  80. data/db/migrate/20201106080924_create_oval_content.rb +12 -0
  81. data/db/migrate/20201116110256_add_oval_content_to_oval_policy.rb +5 -0
  82. data/db/migrate/20201120080329_create_cves.rb +13 -0
  83. data/db/migrate/20201217130800_add_has_errata_to_cve.rb +8 -0
  84. data/db/migrate/20201217161511_add_url_to_oval_content.rb +5 -0
  85. data/db/migrate/20210409095625_add_oval_policy_reference_to_cve.rb +7 -0
  86. data/db/seeds.d/75-job_templates.rb +3 -2
  87. data/lib/foreman_openscap/bulk_upload.rb +2 -2
  88. data/lib/foreman_openscap/engine.rb +67 -9
  89. data/lib/foreman_openscap/version.rb +1 -1
  90. data/lib/tasks/foreman_openscap_tasks.rake +14 -9
  91. data/locale/de/LC_MESSAGES/foreman_openscap.mo +0 -0
  92. data/locale/de/foreman_openscap.edit.po +0 -0
  93. data/locale/de/foreman_openscap.po +215 -17
  94. data/locale/en_GB/LC_MESSAGES/foreman_openscap.mo +0 -0
  95. data/locale/en_GB/foreman_openscap.edit.po +0 -0
  96. data/locale/en_GB/foreman_openscap.po +213 -15
  97. data/locale/es/LC_MESSAGES/foreman_openscap.mo +0 -0
  98. data/locale/es/foreman_openscap.edit.po +0 -0
  99. data/locale/es/foreman_openscap.po +239 -41
  100. data/locale/foreman_openscap.pot +395 -112
  101. data/locale/fr/LC_MESSAGES/foreman_openscap.mo +0 -0
  102. data/locale/fr/foreman_openscap.edit.po +0 -0
  103. data/locale/fr/foreman_openscap.po +243 -45
  104. data/locale/gl/LC_MESSAGES/foreman_openscap.mo +0 -0
  105. data/locale/gl/foreman_openscap.edit.po +0 -0
  106. data/locale/gl/foreman_openscap.po +213 -15
  107. data/locale/it/LC_MESSAGES/foreman_openscap.mo +0 -0
  108. data/locale/it/foreman_openscap.edit.po +0 -0
  109. data/locale/it/foreman_openscap.po +213 -15
  110. data/locale/ja/LC_MESSAGES/foreman_openscap.mo +0 -0
  111. data/locale/ja/foreman_openscap.edit.po +0 -0
  112. data/locale/ja/foreman_openscap.po +262 -66
  113. data/locale/ko/LC_MESSAGES/foreman_openscap.mo +0 -0
  114. data/locale/ko/foreman_openscap.edit.po +0 -0
  115. data/locale/ko/foreman_openscap.po +214 -16
  116. data/locale/pt_BR/LC_MESSAGES/foreman_openscap.mo +0 -0
  117. data/locale/pt_BR/foreman_openscap.edit.po +0 -0
  118. data/locale/pt_BR/foreman_openscap.po +252 -54
  119. data/locale/ru/LC_MESSAGES/foreman_openscap.mo +0 -0
  120. data/locale/ru/foreman_openscap.edit.po +0 -0
  121. data/locale/ru/foreman_openscap.po +214 -16
  122. data/locale/sv_SE/LC_MESSAGES/foreman_openscap.mo +0 -0
  123. data/locale/sv_SE/foreman_openscap.edit.po +0 -0
  124. data/locale/sv_SE/foreman_openscap.po +213 -15
  125. data/locale/zh_CN/LC_MESSAGES/foreman_openscap.mo +0 -0
  126. data/locale/zh_CN/foreman_openscap.edit.po +0 -0
  127. data/locale/zh_CN/foreman_openscap.po +369 -169
  128. data/locale/zh_TW/LC_MESSAGES/foreman_openscap.mo +0 -0
  129. data/locale/zh_TW/foreman_openscap.edit.po +0 -0
  130. data/locale/zh_TW/foreman_openscap.po +214 -16
  131. data/package.json +48 -0
  132. data/test/factories/compliance_host_factory.rb +12 -0
  133. data/test/factories/oval_content_factory.rb +7 -0
  134. data/test/factories/oval_policy_factory.rb +9 -0
  135. data/test/files/oval_contents/ansible-2.9.oval.xml.bz2 +0 -0
  136. data/test/fixtures/cve_fixtures.rb +104 -0
  137. data/test/functional/api/v2/compliance/oval_contents_controller_test.rb +39 -0
  138. data/test/functional/api/v2/compliance/oval_policies_controller_test.rb +141 -0
  139. data/test/functional/api/v2/compliance/oval_reports_controller_test.rb +32 -0
  140. data/test/graphql/queries/oval_contents_query_test.rb +35 -0
  141. data/test/graphql/queries/oval_policies_query_test.rb +35 -0
  142. data/test/test_plugin_helper.rb +4 -0
  143. data/test/unit/oval_host_test.rb +45 -0
  144. data/test/unit/oval_policy_test.rb +133 -0
  145. data/test/unit/oval_status_test.rb +47 -0
  146. data/test/unit/services/oval/cves_test.rb +81 -0
  147. data/test/unit/services/oval/setup_test.rb +87 -0
  148. data/webpack/components/EmptyState.js +67 -0
  149. data/webpack/components/IndexLayout.js +35 -0
  150. data/webpack/components/IndexLayout.scss +3 -0
  151. data/webpack/components/IndexTable/IndexTableHelper.js +9 -0
  152. data/webpack/components/IndexTable/index.js +65 -0
  153. data/webpack/components/RuleSeverity/RuleSeverity.scss +3 -0
  154. data/webpack/components/RuleSeverity/RuleSeverity.test.js +13 -0
  155. data/webpack/components/RuleSeverity/__snapshots__/RuleSeverity.test.js.snap +41 -0
  156. data/webpack/components/RuleSeverity/i_severity-critical.svg +61 -0
  157. data/webpack/components/RuleSeverity/i_severity-high.svg +61 -0
  158. data/webpack/components/RuleSeverity/i_severity-low.svg +62 -0
  159. data/webpack/components/RuleSeverity/i_severity-med.svg +62 -0
  160. data/webpack/components/RuleSeverity/i_unknown.svg +33 -0
  161. data/webpack/components/RuleSeverity/index.js +33 -0
  162. data/webpack/components/withLoading.js +68 -0
  163. data/webpack/global_index.js +5 -0
  164. data/webpack/graphql/queries/cves.gql +18 -0
  165. data/webpack/graphql/queries/ovalContents.gql +11 -0
  166. data/webpack/graphql/queries/ovalPolicies.gql +12 -0
  167. data/webpack/graphql/queries/ovalPolicy.gql +21 -0
  168. data/webpack/helpers/commonHelper.js +1 -0
  169. data/webpack/helpers/globalIdHelper.js +13 -0
  170. data/webpack/helpers/pageParamsHelper.js +31 -0
  171. data/webpack/helpers/pathsHelper.js +22 -0
  172. data/webpack/helpers/tableHelper.js +9 -0
  173. data/webpack/index.js +8 -0
  174. data/webpack/routes/OvalContents/OvalContentsIndex/OvalContentsIndex.js +45 -0
  175. data/webpack/routes/OvalContents/OvalContentsIndex/OvalContentsTable.js +38 -0
  176. data/webpack/routes/OvalContents/OvalContentsIndex/__tests__/OvalContentsIndex.fixtures.js +106 -0
  177. data/webpack/routes/OvalContents/OvalContentsIndex/__tests__/OvalContentsIndex.test.js +75 -0
  178. data/webpack/routes/OvalContents/OvalContentsIndex/index.js +7 -0
  179. data/webpack/routes/OvalPolicies/OvalPoliciesIndex/OvalPoliciesIndex.js +46 -0
  180. data/webpack/routes/OvalPolicies/OvalPoliciesIndex/OvalPoliciesTable.js +44 -0
  181. data/webpack/routes/OvalPolicies/OvalPoliciesIndex/__tests__/OvalPoliciesIndex.fixtures.js +61 -0
  182. data/webpack/routes/OvalPolicies/OvalPoliciesIndex/__tests__/OvalPoliciesIndex.test.js +78 -0
  183. data/webpack/routes/OvalPolicies/OvalPoliciesIndex/index.js +7 -0
  184. data/webpack/routes/OvalPolicies/OvalPoliciesShow/CvesTab.js +48 -0
  185. data/webpack/routes/OvalPolicies/OvalPoliciesShow/CvesTable.js +63 -0
  186. data/webpack/routes/OvalPolicies/OvalPoliciesShow/OvalPoliciesShow.js +78 -0
  187. data/webpack/routes/OvalPolicies/OvalPoliciesShow/OvalPoliciesShowHelper.js +39 -0
  188. data/webpack/routes/OvalPolicies/OvalPoliciesShow/__tests__/OvalPoliciesShow.fixtures.js +78 -0
  189. data/webpack/routes/OvalPolicies/OvalPoliciesShow/__tests__/OvalPoliciesShow.test.js +112 -0
  190. data/webpack/routes/OvalPolicies/OvalPoliciesShow/index.js +35 -0
  191. data/webpack/routes/routes.js +28 -0
  192. data/webpack/testHelper.js +64 -0
  193. metadata +144 -3
@@ -0,0 +1,39 @@
1
+ import { decodeId } from '../../../helpers/globalIdHelper';
2
+ import { addSearch } from '../../../helpers/pageParamsHelper';
3
+ import { newJobPath } from '../../../helpers/pathsHelper';
4
+
5
+ export const policySchedule = policy => {
6
+ switch (policy.period) {
7
+ case 'weekly':
8
+ return `Weekly, on ${policy.weekday}`;
9
+ case 'monthly':
10
+ return `Monthly, day of month: ${policy.dayOfMonth}`;
11
+ case 'custom':
12
+ return `Custom cron: ${policy.cronLine}`;
13
+ default:
14
+ return 'Unknown schedule';
15
+ }
16
+ };
17
+
18
+ const targetingScopedSearchQuery = policy => {
19
+ const hgIds = policy.hostgroups.nodes.reduce((memo, hg) => {
20
+ const ids = [decodeId(hg)].concat(hg.descendants.nodes.map(decodeId));
21
+ return ids.reduce(
22
+ (acc, id) => (acc.includes(id) ? acc : [...acc, id]),
23
+ memo
24
+ );
25
+ }, []);
26
+
27
+ if (hgIds.length === 0) {
28
+ return '';
29
+ }
30
+
31
+ return `hostgroup_id ^ (${hgIds.join(' ')})`;
32
+ };
33
+
34
+ export const newJobFormPath = (policy, policyId) =>
35
+ addSearch(newJobPath, {
36
+ feature: 'foreman_openscap_run_oval_scans',
37
+ host_ids: targetingScopedSearchQuery(policy),
38
+ 'inputs[oval_policies]': policyId,
39
+ });
@@ -0,0 +1,78 @@
1
+ import { mockFactory } from '../../../../testHelper';
2
+ import ovalPolicyQuery from '../../../../graphql/queries/ovalPolicy.gql';
3
+ import cvesQuery from '../../../../graphql/queries/cves.gql';
4
+
5
+ const policyDetailMockFactory = mockFactory('ovalPolicy', ovalPolicyQuery);
6
+ const cvesMockFactory = mockFactory('cves', cvesQuery);
7
+
8
+ const ovalPolicy = {
9
+ id: 'MDE6Rm9yZW1hbk9wZW5zY2FwOjpPdmFsUG9saWN5LTM=',
10
+ name: 'Third policy',
11
+ period: 'weekly',
12
+ cronLine: null,
13
+ weekday: 'tuesday',
14
+ dayOfMonth: null,
15
+ description: 'A very strict policy',
16
+ hostgroups: {
17
+ nodes: [
18
+ {
19
+ id: 'MDE6SG9zdGdyb3VwLTQ=',
20
+ name: 'oval hg',
21
+ descendants: {
22
+ nodes: [
23
+ { id: 'MDE6SG9zdGdyb3VwLTEw' },
24
+ { id: 'MDE6SG9zdGdyb3VwLTEy' },
25
+ { id: 'MDE6SG9zdGdyb3VwLTEx' },
26
+ ],
27
+ },
28
+ },
29
+ ],
30
+ },
31
+ };
32
+
33
+ const cvesResult = {
34
+ totalCount: 1,
35
+ nodes: [
36
+ {
37
+ id: 'MDE6Rm9yZW1hbk9wZW5zY2FwOjpDdmUtMjY3',
38
+ refId: 'CVE-2020-14365',
39
+ refUrl: 'https://access.redhat.com/security/cve/CVE-2020-14365',
40
+ definitionId: 'oval:com.redhat.rhsa:def:20203601',
41
+ hasErrata: true,
42
+ hosts: {
43
+ nodes: [
44
+ {
45
+ id: 'MDE6SG9zdC0z',
46
+ name: 'centos-random.example.com',
47
+ },
48
+ ],
49
+ },
50
+ },
51
+ ],
52
+ };
53
+
54
+ export const ovalPolicyId = 3;
55
+
56
+ export const pushMock = jest.fn();
57
+
58
+ export const historyMock = {
59
+ location: {
60
+ search: '',
61
+ },
62
+ push: pushMock,
63
+ };
64
+
65
+ export const historyWithSearch = {
66
+ location: {
67
+ search: '?page=1&perPage=5',
68
+ },
69
+ };
70
+
71
+ export const policyDetailMock = policyDetailMockFactory(
72
+ { id: ovalPolicy.id },
73
+ ovalPolicy
74
+ );
75
+ export const policyCvesMock = cvesMockFactory(
76
+ { search: `oval_policy_id = ${ovalPolicyId}`, first: 5, last: 5 },
77
+ cvesResult
78
+ );
@@ -0,0 +1,112 @@
1
+ import React from 'react';
2
+ import { Router } from 'react-router-dom';
3
+ import { render, screen, waitFor } from '@testing-library/react';
4
+ import { within } from '@testing-library/dom';
5
+ import '@testing-library/jest-dom';
6
+ import userEvent from '@testing-library/user-event';
7
+ import { createMemoryHistory } from 'history';
8
+
9
+ import OvalPoliciesShow from '../index';
10
+ import {
11
+ ovalPoliciesShowPath,
12
+ resolvePath,
13
+ } from '../../../../helpers/pathsHelper';
14
+
15
+ import { withMockedProvider, tick, withRouter } from '../../../../testHelper';
16
+ import {
17
+ policyDetailMock,
18
+ historyMock,
19
+ historyWithSearch,
20
+ pushMock,
21
+ policyCvesMock,
22
+ ovalPolicyId,
23
+ } from './OvalPoliciesShow.fixtures';
24
+
25
+ const TestComponent = withRouter(withMockedProvider(OvalPoliciesShow));
26
+
27
+ describe('OvalPoliciesShow', () => {
28
+ it('should load details by default and handle tab change', async () => {
29
+ const { container } = render(
30
+ <TestComponent
31
+ history={historyMock}
32
+ match={{ params: { id: ovalPolicyId }, path: ovalPoliciesShowPath }}
33
+ mocks={policyDetailMock}
34
+ />
35
+ );
36
+ expect(screen.getByText('Loading')).toBeInTheDocument();
37
+ await waitFor(tick);
38
+ expect(screen.queryByText('Loading')).not.toBeInTheDocument();
39
+ expect(screen.getByText('Third policy')).toBeInTheDocument();
40
+ expect(screen.getByText('Weekly, on tuesday')).toBeInTheDocument();
41
+ expect(screen.getByText('A very strict policy')).toBeInTheDocument();
42
+ const activeTabHeader = container.querySelector(
43
+ '.pf-c-tabs__item.pf-m-current'
44
+ );
45
+ expect(within(activeTabHeader).getByText('Details')).toBeInTheDocument();
46
+ userEvent.click(screen.getByRole('button', { name: 'CVEs' }));
47
+ expect(pushMock).toHaveBeenCalledWith(
48
+ resolvePath(ovalPoliciesShowPath, {
49
+ ':id': ovalPolicyId,
50
+ ':tab?': 'cves',
51
+ })
52
+ );
53
+ });
54
+ it('should load details tab when specified in URL', async () => {
55
+ render(
56
+ <TestComponent
57
+ history={historyMock}
58
+ match={{
59
+ params: { id: ovalPolicyId, tab: 'details' },
60
+ path: ovalPoliciesShowPath,
61
+ }}
62
+ mocks={policyDetailMock}
63
+ />
64
+ );
65
+ expect(screen.getByText('Loading')).toBeInTheDocument();
66
+ await waitFor(tick);
67
+ expect(screen.queryByText('Loading')).not.toBeInTheDocument();
68
+ expect(screen.getByText('Weekly, on tuesday')).toBeInTheDocument();
69
+ });
70
+ it('should load CVEs tab when specified in URL', async () => {
71
+ const mocks = policyDetailMock.concat(policyCvesMock);
72
+ render(
73
+ <TestComponent
74
+ history={historyWithSearch}
75
+ match={{
76
+ params: { id: ovalPolicyId, tab: 'cves' },
77
+ path: ovalPoliciesShowPath,
78
+ }}
79
+ mocks={mocks}
80
+ />
81
+ );
82
+ expect(screen.getByText('Loading')).toBeInTheDocument();
83
+ await waitFor(tick);
84
+ await waitFor(tick);
85
+ expect(screen.queryByText('Loading')).not.toBeInTheDocument();
86
+ expect(screen.getByText('CVE-2020-14365')).toBeInTheDocument();
87
+ });
88
+ it('should have button for scanning all hostgroups', async () => {
89
+ const btnText = 'Scan All Hostgroups';
90
+
91
+ const WithProvider = withMockedProvider(OvalPoliciesShow);
92
+ const history = createMemoryHistory();
93
+ history.push = jest.fn();
94
+
95
+ render(
96
+ <Router history={history}>
97
+ <WithProvider
98
+ history={history}
99
+ match={{ params: { id: ovalPolicyId }, path: ovalPoliciesShowPath }}
100
+ mocks={policyDetailMock}
101
+ />
102
+ </Router>
103
+ );
104
+ await waitFor(tick);
105
+ expect(screen.queryByText('Loading')).not.toBeInTheDocument();
106
+ expect(screen.getByText(btnText)).toBeInTheDocument();
107
+ userEvent.click(screen.getByRole('button', { name: btnText }));
108
+ expect(history.push).toHaveBeenCalledWith(
109
+ '/job_invocations/new?feature=foreman_openscap_run_oval_scans&host_ids=hostgroup_id+%5E+%284+10+12+11%29&inputs%5Boval_policies%5D=3'
110
+ );
111
+ });
112
+ });
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { useQuery } from '@apollo/client';
4
+
5
+ import { translate as __ } from 'foremanReact/common/I18n';
6
+
7
+ import OvalPoliciesShow from './OvalPoliciesShow';
8
+ import { encodeId } from '../../../helpers/globalIdHelper';
9
+
10
+ import ovalPolicy from '../../../graphql/queries/ovalPolicy.gql';
11
+
12
+ const WrappedOvalPoliciesShow = props => {
13
+ const id = encodeId('ForemanOpenscap::OvalPolicy', props.match.params.id);
14
+
15
+ const useFetchFn = componentProps =>
16
+ useQuery(ovalPolicy, { variables: { id } });
17
+
18
+ const renameData = data => ({ policy: data.ovalPolicy });
19
+
20
+ return (
21
+ <OvalPoliciesShow
22
+ {...props}
23
+ fetchFn={useFetchFn}
24
+ renameData={renameData}
25
+ resultPath="ovalPolicy"
26
+ emptyStateTitle={__('No OVAL Policy found')}
27
+ />
28
+ );
29
+ };
30
+
31
+ WrappedOvalPoliciesShow.propTypes = {
32
+ match: PropTypes.object.isRequired,
33
+ };
34
+
35
+ export default WrappedOvalPoliciesShow;
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import OvalContentsIndex from './OvalContents/OvalContentsIndex';
3
+ import OvalPoliciesIndex from './OvalPolicies/OvalPoliciesIndex';
4
+ import OvalPoliciesShow from './OvalPolicies/OvalPoliciesShow';
5
+
6
+ import {
7
+ ovalContentsPath,
8
+ ovalPoliciesPath,
9
+ ovalPoliciesShowPath,
10
+ } from '../helpers/pathsHelper';
11
+
12
+ export default [
13
+ {
14
+ path: ovalContentsPath,
15
+ render: props => <OvalContentsIndex {...props} />,
16
+ exact: true,
17
+ },
18
+ {
19
+ path: ovalPoliciesPath,
20
+ render: props => <OvalPoliciesIndex {...props} />,
21
+ exact: true,
22
+ },
23
+ {
24
+ path: ovalPoliciesShowPath,
25
+ render: props => <OvalPoliciesShow {...props} />,
26
+ exact: true,
27
+ },
28
+ ];
@@ -0,0 +1,64 @@
1
+ import React from 'react';
2
+ import { MockedProvider } from '@apollo/react-testing';
3
+ import { MemoryRouter } from 'react-router-dom';
4
+ import { getForemanContext } from 'foremanReact/Root/Context/ForemanContext';
5
+
6
+ export const withRouter = Component => props => (
7
+ <MemoryRouter>
8
+ <Component {...props} />
9
+ </MemoryRouter>
10
+ );
11
+
12
+ export const withMockedProvider = Component => props => {
13
+ const ForemanContext = getForemanContext(ctx);
14
+ // eslint-disable-next-line react/prop-types
15
+ const { mocks, ...rest } = props;
16
+
17
+ const ctx = {
18
+ metadata: {
19
+ UISettings: {
20
+ perPage: 20,
21
+ },
22
+ },
23
+ };
24
+
25
+ return (
26
+ <ForemanContext.Provider value={ctx}>
27
+ <MockedProvider mocks={mocks} addTypename={false}>
28
+ <Component {...rest} />
29
+ </MockedProvider>
30
+ </ForemanContext.Provider>
31
+ );
32
+ };
33
+
34
+ // use to resolve async mock requests for apollo MockedProvider
35
+ export const tick = () => new Promise(resolve => setTimeout(resolve, 0));
36
+
37
+ export const historyMock = {
38
+ location: {
39
+ search: '',
40
+ },
41
+ };
42
+
43
+ export const mockFactory = (resultName, query) => (
44
+ variables,
45
+ modelResults,
46
+ errors = []
47
+ ) => {
48
+ const mock = {
49
+ request: {
50
+ query,
51
+ variables,
52
+ },
53
+ result: {
54
+ data: {
55
+ [resultName]: modelResults,
56
+ },
57
+ },
58
+ };
59
+
60
+ if (errors.length !== 0) {
61
+ mock.result.errors = errors;
62
+ }
63
+ return [mock];
64
+ };
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_openscap
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.3
4
+ version: 4.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - slukasik@redhat.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-18 00:00:00.000000000 Z
11
+ date: 2021-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -45,6 +45,9 @@ files:
45
45
  - app/assets/stylesheets/foreman_openscap/reports.css
46
46
  - app/assets/stylesheets/foreman_openscap/scap_breakdown_chart.css
47
47
  - app/controllers/api/v2/compliance/arf_reports_controller.rb
48
+ - app/controllers/api/v2/compliance/oval_contents_controller.rb
49
+ - app/controllers/api/v2/compliance/oval_policies_controller.rb
50
+ - app/controllers/api/v2/compliance/oval_reports_controller.rb
48
51
  - app/controllers/api/v2/compliance/policies_controller.rb
49
52
  - app/controllers/api/v2/compliance/scap_content_profiles_controller.rb
50
53
  - app/controllers/api/v2/compliance/scap_contents_controller.rb
@@ -52,6 +55,8 @@ files:
52
55
  - app/controllers/arf_reports_controller.rb
53
56
  - app/controllers/compliance_dashboard_controller.rb
54
57
  - app/controllers/compliance_hosts_controller.rb
58
+ - app/controllers/concerns/foreman/controller/parameters/oval_content.rb
59
+ - app/controllers/concerns/foreman/controller/parameters/oval_policy.rb
55
60
  - app/controllers/concerns/foreman/controller/parameters/policy.rb
56
61
  - app/controllers/concerns/foreman/controller/parameters/policy_api.rb
57
62
  - app/controllers/concerns/foreman/controller/parameters/scap_content.rb
@@ -67,6 +72,9 @@ files:
67
72
  - app/controllers/policy_dashboard_controller.rb
68
73
  - app/controllers/scap_contents_controller.rb
69
74
  - app/controllers/tailoring_files_controller.rb
75
+ - app/graphql/types/cve.rb
76
+ - app/graphql/types/oval_content.rb
77
+ - app/graphql/types/oval_policy.rb
70
78
  - app/helpers/arf_report_dashboard_helper.rb
71
79
  - app/helpers/arf_reports_helper.rb
72
80
  - app/helpers/compliance_dashboard_helper.rb
@@ -84,14 +92,28 @@ files:
84
92
  - app/models/concerns/foreman_openscap/data_stream_content.rb
85
93
  - app/models/concerns/foreman_openscap/host_extensions.rb
86
94
  - app/models/concerns/foreman_openscap/hostgroup_extensions.rb
95
+ - app/models/concerns/foreman_openscap/inherited_policies.rb
87
96
  - app/models/concerns/foreman_openscap/log_extensions.rb
88
97
  - app/models/concerns/foreman_openscap/openscap_proxy_core_extensions.rb
89
98
  - app/models/concerns/foreman_openscap/openscap_proxy_extensions.rb
99
+ - app/models/concerns/foreman_openscap/oval_facet_host_extensions.rb
100
+ - app/models/concerns/foreman_openscap/oval_facet_hostgroup_extensions.rb
101
+ - app/models/concerns/foreman_openscap/policy_common.rb
102
+ - app/models/concerns/foreman_openscap/scap_file_content.rb
90
103
  - app/models/concerns/foreman_openscap/smart_proxy_extensions.rb
91
104
  - app/models/foreman_openscap/arf_report.rb
92
105
  - app/models/foreman_openscap/asset.rb
93
106
  - app/models/foreman_openscap/asset_policy.rb
94
107
  - app/models/foreman_openscap/compliance_status.rb
108
+ - app/models/foreman_openscap/cve.rb
109
+ - app/models/foreman_openscap/host/oval_facet.rb
110
+ - app/models/foreman_openscap/host_cve.rb
111
+ - app/models/foreman_openscap/hostgroup/oval_facet.rb
112
+ - app/models/foreman_openscap/hostgroup_oval_facet_oval_policy.rb
113
+ - app/models/foreman_openscap/oval_content.rb
114
+ - app/models/foreman_openscap/oval_facet_oval_policy.rb
115
+ - app/models/foreman_openscap/oval_policy.rb
116
+ - app/models/foreman_openscap/oval_status.rb
95
117
  - app/models/foreman_openscap/policy.rb
96
118
  - app/models/foreman_openscap/policy_arf_report.rb
97
119
  - app/models/foreman_openscap/policy_revision.rb
@@ -106,9 +128,17 @@ files:
106
128
  - app/services/foreman_openscap/config_name_service.rb
107
129
  - app/services/foreman_openscap/host_report_dashboard/data.rb
108
130
  - app/services/foreman_openscap/hostgroup_overrider.rb
131
+ - app/services/foreman_openscap/hostgroup_overrider_common.rb
109
132
  - app/services/foreman_openscap/lookup_key_overrider.rb
133
+ - app/services/foreman_openscap/lookup_key_overrides_common.rb
110
134
  - app/services/foreman_openscap/openscap_proxy_assigned_version_check.rb
111
135
  - app/services/foreman_openscap/openscap_proxy_version_check.rb
136
+ - app/services/foreman_openscap/oval/check_collection.rb
137
+ - app/services/foreman_openscap/oval/configure.rb
138
+ - app/services/foreman_openscap/oval/cves.rb
139
+ - app/services/foreman_openscap/oval/setup.rb
140
+ - app/services/foreman_openscap/oval/setup_check.rb
141
+ - app/services/foreman_openscap/oval/sync_oval_contents.rb
112
142
  - app/services/foreman_openscap/policy_dashboard/data.rb
113
143
  - app/services/foreman_openscap/report_dashboard/data.rb
114
144
  - app/services/proxy_status/openscap_spool.rb
@@ -120,12 +150,25 @@ files:
120
150
  - app/views/api/v2/compliance/arf_reports/show.json.rabl
121
151
  - app/views/api/v2/compliance/common/_loc.json.rabl
122
152
  - app/views/api/v2/compliance/common/_org.json.rabl
153
+ - app/views/api/v2/compliance/oval_contents/base.json.rabl
154
+ - app/views/api/v2/compliance/oval_contents/create.json.rabl
155
+ - app/views/api/v2/compliance/oval_contents/destroy.json.rabl
156
+ - app/views/api/v2/compliance/oval_contents/index.json.rabl
157
+ - app/views/api/v2/compliance/oval_contents/show.json.rabl
158
+ - app/views/api/v2/compliance/oval_contents/sync.json.rabl
159
+ - app/views/api/v2/compliance/oval_contents/sync_result.json.rabl
160
+ - app/views/api/v2/compliance/oval_contents/update.json.rabl
161
+ - app/views/api/v2/compliance/oval_policies/create.json.rabl
162
+ - app/views/api/v2/compliance/oval_policies/index.json.rabl
163
+ - app/views/api/v2/compliance/oval_policies/main.json.rabl
164
+ - app/views/api/v2/compliance/oval_policies/show.json.rabl
123
165
  - app/views/api/v2/compliance/policies/base.json.rabl
124
166
  - app/views/api/v2/compliance/policies/children.json.rabl
125
167
  - app/views/api/v2/compliance/policies/create.json.rabl
126
168
  - app/views/api/v2/compliance/policies/index.json.rabl
127
169
  - app/views/api/v2/compliance/policies/main.json.rabl
128
170
  - app/views/api/v2/compliance/policies/show.json.rabl
171
+ - app/views/api/v2/compliance/policies_common/_attrs.json.rabl
129
172
  - app/views/api/v2/compliance/scap_content_profiles/base.json.rabl
130
173
  - app/views/api/v2/compliance/scap_content_profiles/index.json.rabl
131
174
  - app/views/api/v2/compliance/scap_content_profiles/main.json.rabl
@@ -161,6 +204,7 @@ files:
161
204
  - app/views/foreman_openscap/policy_mailer/policy_summary.erb
162
205
  - app/views/hosts/select_multiple_openscap_proxy.html.erb
163
206
  - app/views/job_templates/run_openscap_scans.erb
207
+ - app/views/job_templates/run_oval_scans.erb
164
208
  - app/views/policies/_form.html.erb
165
209
  - app/views/policies/_list.html.erb
166
210
  - app/views/policies/_scap_content_results.html.erb
@@ -199,6 +243,7 @@ files:
199
243
  - app/views/tailoring_files/index.html.erb
200
244
  - app/views/tailoring_files/new.html.erb
201
245
  - app/views/tailoring_files/welcome.html.erb
246
+ - config/initializers/inflections.rb
202
247
  - config/routes.rb
203
248
  - db/migrate/20141013172051_create_scaptimony_policies.rb
204
249
  - db/migrate/20141014105333_create_scaptimony_assets.rb
@@ -246,7 +291,16 @@ files:
246
291
  - db/migrate/20190103093409_add_deployment_option_to_policy.foreman_openscap.rb
247
292
  - db/migrate/20200117135424_migrate_port_overrides_to_int.rb
248
293
  - db/migrate/20200803065041_migrate_port_overrides_for_ansible.rb
294
+ - db/migrate/20201019074925_create_oval_policy.rb
295
+ - db/migrate/20201020113801_create_oval_facet.rb
296
+ - db/migrate/20201021084109_create_hostgroup_oval_facet.rb
297
+ - db/migrate/20201106080924_create_oval_content.rb
298
+ - db/migrate/20201116110256_add_oval_content_to_oval_policy.rb
299
+ - db/migrate/20201120080329_create_cves.rb
249
300
  - db/migrate/20201202110213_update_puppet_port_param_type.rb
301
+ - db/migrate/20201217130800_add_has_errata_to_cve.rb
302
+ - db/migrate/20201217161511_add_url_to_oval_content.rb
303
+ - db/migrate/20210409095625_add_oval_policy_reference_to_cve.rb
250
304
  - db/seeds.d/75-job_templates.rb
251
305
  - db/seeds.d/openscap_feature.rb
252
306
  - db/seeds.d/openscap_policy_notification.rb
@@ -261,37 +315,53 @@ files:
261
315
  - locale/Makefile
262
316
  - locale/action_names.rb
263
317
  - locale/de/LC_MESSAGES/foreman_openscap.mo
318
+ - locale/de/foreman_openscap.edit.po
264
319
  - locale/de/foreman_openscap.po
265
320
  - locale/en_GB/LC_MESSAGES/foreman_openscap.mo
321
+ - locale/en_GB/foreman_openscap.edit.po
266
322
  - locale/en_GB/foreman_openscap.po
267
323
  - locale/es/LC_MESSAGES/foreman_openscap.mo
324
+ - locale/es/foreman_openscap.edit.po
268
325
  - locale/es/foreman_openscap.po
269
326
  - locale/foreman_openscap.pot
270
327
  - locale/fr/LC_MESSAGES/foreman_openscap.mo
328
+ - locale/fr/foreman_openscap.edit.po
271
329
  - locale/fr/foreman_openscap.po
272
330
  - locale/gl/LC_MESSAGES/foreman_openscap.mo
331
+ - locale/gl/foreman_openscap.edit.po
273
332
  - locale/gl/foreman_openscap.po
274
333
  - locale/it/LC_MESSAGES/foreman_openscap.mo
334
+ - locale/it/foreman_openscap.edit.po
275
335
  - locale/it/foreman_openscap.po
276
336
  - locale/ja/LC_MESSAGES/foreman_openscap.mo
337
+ - locale/ja/foreman_openscap.edit.po
277
338
  - locale/ja/foreman_openscap.po
278
339
  - locale/ko/LC_MESSAGES/foreman_openscap.mo
340
+ - locale/ko/foreman_openscap.edit.po
279
341
  - locale/ko/foreman_openscap.po
280
342
  - locale/pt_BR/LC_MESSAGES/foreman_openscap.mo
343
+ - locale/pt_BR/foreman_openscap.edit.po
281
344
  - locale/pt_BR/foreman_openscap.po
282
345
  - locale/ru/LC_MESSAGES/foreman_openscap.mo
346
+ - locale/ru/foreman_openscap.edit.po
283
347
  - locale/ru/foreman_openscap.po
284
348
  - locale/sv_SE/LC_MESSAGES/foreman_openscap.mo
349
+ - locale/sv_SE/foreman_openscap.edit.po
285
350
  - locale/sv_SE/foreman_openscap.po
286
351
  - locale/zanata.xml
287
352
  - locale/zh_CN/LC_MESSAGES/foreman_openscap.mo
353
+ - locale/zh_CN/foreman_openscap.edit.po
288
354
  - locale/zh_CN/foreman_openscap.po
289
355
  - locale/zh_TW/LC_MESSAGES/foreman_openscap.mo
356
+ - locale/zh_TW/foreman_openscap.edit.po
290
357
  - locale/zh_TW/foreman_openscap.po
358
+ - package.json
291
359
  - test/factories/arf_report_factory.rb
292
360
  - test/factories/asset_factory.rb
293
361
  - test/factories/compliance_host_factory.rb
294
362
  - test/factories/compliance_log_factory.rb
363
+ - test/factories/oval_content_factory.rb
364
+ - test/factories/oval_policy_factory.rb
295
365
  - test/factories/policy_arf_report_factory.rb
296
366
  - test/factories/policy_factory.rb
297
367
  - test/factories/scap_content_related.rb
@@ -300,10 +370,15 @@ files:
300
370
  - test/files/arf_report/arf_report.json
301
371
  - test/files/arf_report/arf_report_msg_desc_changed.json
302
372
  - test/files/arf_report/arf_report_msg_value_changed.json
373
+ - test/files/oval_contents/ansible-2.9.oval.xml.bz2
303
374
  - test/files/scap_contents/ssg-fedora-ds.xml
304
375
  - test/files/tailoring_files/ssg-firefox-ds-tailoring-2.xml
305
376
  - test/files/tailoring_files/ssg-firefox-ds-tailoring.xml
377
+ - test/fixtures/cve_fixtures.rb
306
378
  - test/functional/api/v2/compliance/arf_reports_controller_test.rb
379
+ - test/functional/api/v2/compliance/oval_contents_controller_test.rb
380
+ - test/functional/api/v2/compliance/oval_policies_controller_test.rb
381
+ - test/functional/api/v2/compliance/oval_reports_controller_test.rb
307
382
  - test/functional/api/v2/compliance/policies_controller_test.rb
308
383
  - test/functional/api/v2/compliance/scap_content_profiles_controller_test.rb
309
384
  - test/functional/api/v2/compliance/scap_contents_controller_test.rb
@@ -312,6 +387,8 @@ files:
312
387
  - test/functional/arf_reports_controller_test.rb
313
388
  - test/functional/openscap_proxies_controller_test.rb
314
389
  - test/functional/tailoring_files_controller_test.rb
390
+ - test/graphql/queries/oval_contents_query_test.rb
391
+ - test/graphql/queries/oval_policies_query_test.rb
315
392
  - test/helpers/arf_report_dashboard_helper_test.rb
316
393
  - test/helpers/policy_dashboard_helper_test.rb
317
394
  - test/lib/foreman_openscap/bulk_upload_test.rb
@@ -323,15 +400,65 @@ files:
323
400
  - test/unit/concerns/openscap_proxy_extenstions_test.rb
324
401
  - test/unit/message_cleaner_test.rb
325
402
  - test/unit/openscap_host_test.rb
403
+ - test/unit/oval_host_test.rb
404
+ - test/unit/oval_policy_test.rb
405
+ - test/unit/oval_status_test.rb
326
406
  - test/unit/policy_mailer_test.rb
327
407
  - test/unit/policy_test.rb
328
408
  - test/unit/scap_content_test.rb
329
409
  - test/unit/services/config_name_service_test.rb
330
410
  - test/unit/services/hostgroup_overrider_test.rb
331
411
  - test/unit/services/lookup_key_overrider_test.rb
412
+ - test/unit/services/oval/cves_test.rb
413
+ - test/unit/services/oval/setup_test.rb
332
414
  - test/unit/services/report_dashboard/data_test.rb
333
415
  - test/unit/services/tailoring_files_proxy_check_test.rb
334
416
  - test/unit/tailoring_file_test.rb
417
+ - webpack/components/EmptyState.js
418
+ - webpack/components/IndexLayout.js
419
+ - webpack/components/IndexLayout.scss
420
+ - webpack/components/IndexTable/IndexTableHelper.js
421
+ - webpack/components/IndexTable/index.js
422
+ - webpack/components/RuleSeverity/RuleSeverity.scss
423
+ - webpack/components/RuleSeverity/RuleSeverity.test.js
424
+ - webpack/components/RuleSeverity/__snapshots__/RuleSeverity.test.js.snap
425
+ - webpack/components/RuleSeverity/i_severity-critical.svg
426
+ - webpack/components/RuleSeverity/i_severity-high.svg
427
+ - webpack/components/RuleSeverity/i_severity-low.svg
428
+ - webpack/components/RuleSeverity/i_severity-med.svg
429
+ - webpack/components/RuleSeverity/i_unknown.svg
430
+ - webpack/components/RuleSeverity/index.js
431
+ - webpack/components/withLoading.js
432
+ - webpack/global_index.js
433
+ - webpack/graphql/queries/cves.gql
434
+ - webpack/graphql/queries/ovalContents.gql
435
+ - webpack/graphql/queries/ovalPolicies.gql
436
+ - webpack/graphql/queries/ovalPolicy.gql
437
+ - webpack/helpers/commonHelper.js
438
+ - webpack/helpers/globalIdHelper.js
439
+ - webpack/helpers/pageParamsHelper.js
440
+ - webpack/helpers/pathsHelper.js
441
+ - webpack/helpers/tableHelper.js
442
+ - webpack/index.js
443
+ - webpack/routes/OvalContents/OvalContentsIndex/OvalContentsIndex.js
444
+ - webpack/routes/OvalContents/OvalContentsIndex/OvalContentsTable.js
445
+ - webpack/routes/OvalContents/OvalContentsIndex/__tests__/OvalContentsIndex.fixtures.js
446
+ - webpack/routes/OvalContents/OvalContentsIndex/__tests__/OvalContentsIndex.test.js
447
+ - webpack/routes/OvalContents/OvalContentsIndex/index.js
448
+ - webpack/routes/OvalPolicies/OvalPoliciesIndex/OvalPoliciesIndex.js
449
+ - webpack/routes/OvalPolicies/OvalPoliciesIndex/OvalPoliciesTable.js
450
+ - webpack/routes/OvalPolicies/OvalPoliciesIndex/__tests__/OvalPoliciesIndex.fixtures.js
451
+ - webpack/routes/OvalPolicies/OvalPoliciesIndex/__tests__/OvalPoliciesIndex.test.js
452
+ - webpack/routes/OvalPolicies/OvalPoliciesIndex/index.js
453
+ - webpack/routes/OvalPolicies/OvalPoliciesShow/CvesTab.js
454
+ - webpack/routes/OvalPolicies/OvalPoliciesShow/CvesTable.js
455
+ - webpack/routes/OvalPolicies/OvalPoliciesShow/OvalPoliciesShow.js
456
+ - webpack/routes/OvalPolicies/OvalPoliciesShow/OvalPoliciesShowHelper.js
457
+ - webpack/routes/OvalPolicies/OvalPoliciesShow/__tests__/OvalPoliciesShow.fixtures.js
458
+ - webpack/routes/OvalPolicies/OvalPoliciesShow/__tests__/OvalPoliciesShow.test.js
459
+ - webpack/routes/OvalPolicies/OvalPoliciesShow/index.js
460
+ - webpack/routes/routes.js
461
+ - webpack/testHelper.js
335
462
  homepage: https://github.com/theforeman/foreman_openscap
336
463
  licenses:
337
464
  - GPL-3.0
@@ -358,11 +485,13 @@ summary: Foreman plug-in for displaying OpenSCAP audit reports
358
485
  test_files:
359
486
  - test/factories/arf_report_factory.rb
360
487
  - test/factories/asset_factory.rb
361
- - test/factories/compliance_host_factory.rb
362
488
  - test/factories/policy_arf_report_factory.rb
363
489
  - test/factories/policy_factory.rb
364
490
  - test/factories/scap_content_related.rb
365
491
  - test/factories/compliance_log_factory.rb
492
+ - test/factories/compliance_host_factory.rb
493
+ - test/factories/oval_content_factory.rb
494
+ - test/factories/oval_policy_factory.rb
366
495
  - test/files/arf_report/arf_report.bz2
367
496
  - test/files/arf_report/arf_report.html
368
497
  - test/files/arf_report/arf_report.json
@@ -371,11 +500,15 @@ test_files:
371
500
  - test/files/scap_contents/ssg-fedora-ds.xml
372
501
  - test/files/tailoring_files/ssg-firefox-ds-tailoring-2.xml
373
502
  - test/files/tailoring_files/ssg-firefox-ds-tailoring.xml
503
+ - test/files/oval_contents/ansible-2.9.oval.xml.bz2
374
504
  - test/functional/api/v2/compliance/policies_controller_test.rb
375
505
  - test/functional/api/v2/compliance/scap_content_profiles_controller_test.rb
376
506
  - test/functional/api/v2/compliance/scap_contents_controller_test.rb
377
507
  - test/functional/api/v2/compliance/tailoring_files_controller_test.rb
378
508
  - test/functional/api/v2/compliance/arf_reports_controller_test.rb
509
+ - test/functional/api/v2/compliance/oval_contents_controller_test.rb
510
+ - test/functional/api/v2/compliance/oval_policies_controller_test.rb
511
+ - test/functional/api/v2/compliance/oval_reports_controller_test.rb
379
512
  - test/functional/api/v2/hosts_controller_test.rb
380
513
  - test/functional/arf_reports_controller_test.rb
381
514
  - test/functional/openscap_proxies_controller_test.rb
@@ -397,6 +530,14 @@ test_files:
397
530
  - test/unit/services/lookup_key_overrider_test.rb
398
531
  - test/unit/services/report_dashboard/data_test.rb
399
532
  - test/unit/services/tailoring_files_proxy_check_test.rb
533
+ - test/unit/services/oval/cves_test.rb
534
+ - test/unit/services/oval/setup_test.rb
400
535
  - test/unit/tailoring_file_test.rb
401
536
  - test/unit/policy_test.rb
537
+ - test/unit/oval_host_test.rb
538
+ - test/unit/oval_policy_test.rb
539
+ - test/unit/oval_status_test.rb
540
+ - test/fixtures/cve_fixtures.rb
541
+ - test/graphql/queries/oval_contents_query_test.rb
542
+ - test/graphql/queries/oval_policies_query_test.rb
402
543
  - test/test_plugin_helper.rb