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

Multiple Enhancements #5

Merged
merged 55 commits into from
Nov 9, 2022
Merged

Multiple Enhancements #5

merged 55 commits into from
Nov 9, 2022

Conversation

camdenmoors
Copy link
Collaborator

@camdenmoors camdenmoors commented Jun 13, 2022

Todo:

  • Parsing XCCDF
  • Parsing InSpec Profiles
  • Finding the difference between two STIGs
  • Finding the difference between an InSpec Profile and a STIG
  • Add functions to automatically update changed controls to the SAF CLI
  • Add better unit tests than 'it parses correctly'
  • Generate a markdown report of changed controls

@Amndeep7
Copy link

Amndeep7 commented Jul 1, 2022

This is impossible to review as it is now. Can we split out the sample files into their own branch and get that merged first? Please double check the contents of those directories tho since I saw a whole bunch of .DS_STORE etc.

Take pity lmao
image

@aaronlippold
Copy link
Member

@Amndeep7 @camdenmoors any reason this PR has not yet been merged? Also what's 'left on the list' for a 1.0 MVP? @georgedias @em-c-rod

@@ -0,0 +1,38 @@
name: Run TS-InSpec-Objects E2E Tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A general note for workflows:
Should we add a workflow for publishing the package to npm?
Was the npm package that is there now published manually off of this branch? It seems like these updates are a part of that package.
https://www.npmjs.com/package/@mitre/inspec-objects

"version": "1.0.0",
"description": "Typescript objects for InSpec profiles",
"main": "index.ts",
"name": "@mitre/inspec-objects",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to name the repository inspec-objects instead of ts-inspec-objects? Seems like a good idea for them to match.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was chosen so it wouldn't be confused with inspec/inspec-objects

Copy link
Contributor

@em-c-rod em-c-rod Oct 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood, but we also have this repo, which makes this unclear. Let's discuss what is the best resolution.
https://github.com/mitre/inspec-objects

@@ -0,0 +1,5100 @@
export const data = {
'CCI-000001': 'AC-1 a 1',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this mapping come from? (Specifically, the CCIs) I heard someone conversation about these tags in a Vulcan talk today and whether or not you can get the AC-1 type of tags with what is automatically populated from an SRG. I think I need to know more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are taken from DISA's website here and is converted with mitre/heimdall2@libs/hdf-converters/data/converters/xml2json.ts

@em-c-rod
Copy link
Contributor

Why upload the profile-objects content to the repo? What purpose do they serve? Can't we create them on test?

Also, when I ran the tests locally, it gave a diff for all of the STIGs in profile-objects because it had things like "\n\n", where the files stored in the repo did not. What change caused this?

@camdenmoors

@camdenmoors
Copy link
Collaborator Author

Why upload the profile-objects content to the repo? What purpose do they serve? Can't we create them on test?

Assuming this is referring to the output data, mostly this was done for testing and demonstration purposes.

Also, when I ran the tests locally, it gave a diff for all of the STIGs in profile-objects because it had things like "\n\n", where the files stored in the repo did not. What change caused this?

Will discuss during our meeting later today

Emily Rodriguez and others added 8 commits October 19, 2022 12:22
…eFormattingDiff and originalDiff => rawDiff, ensured that renamed controls are not counted as added controls

Signed-off-by: Will Dower <[email protected]>
… Update test is failing

Signed-off-by: Emily Rodriguez <[email protected]>
…yntax (not just %q), added new testfile with percent string (%<) to test this

Signed-off-by: Will Dower <[email protected]>
@em-c-rod em-c-rod merged commit 0d86a48 into main Nov 9, 2022
@em-c-rod em-c-rod deleted the dev branch November 9, 2022 21:54
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

Successfully merging this pull request may close these issues.

5 participants