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

feat: in scan mode, migrate addToHistory() calls to the queue handlers #93

Merged
merged 6 commits into from
Feb 22, 2024

Conversation

csmig
Copy link
Member

@csmig csmig commented Feb 20, 2024

Resolves #62

This PR changes the scan mode logic for inserting newly discovered files into the historySet. The legacy logic added files into the historySet as soon as the scan function detected them. The updated code adds files later in the processing pipeline and only when the following conditions occur:

  • The parsing function rejects the file by throwing an error.
  • The TaskObject reports the file is associated with an Asset that does not exist in the API and --create-objects is false.
  • The tasks associated with the file (creating the Asset, updating STIG mappings, posting Reviews) have all completed successfully.

The PR also updates the unit tests for the history management features.

Copy link

sonarcloud bot commented Feb 22, 2024

Quality Gate Passed Quality Gate passed for 'NUWCDIVNPT_stigman-watcher'

Issues
0 New issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@csmig csmig merged commit a70d38a into main Feb 22, 2024
3 checks passed
csmig added a commit to csmig/stigman-watcher that referenced this pull request Mar 4, 2024
commit f08e187
Author: csmig <33138761+csmig@users.noreply.github.com>
Date:   Thu Feb 29 18:58:21 2024 +0000

    chore: remove/update dependencies (NUWCDIVNPT#97)

commit a70d38a
Author: csmig <33138761+csmig@users.noreply.github.com>
Date:   Thu Feb 22 19:41:45 2024 +0000

    feat: in scan mode, migrate addToHistory() calls to the queue handlers (NUWCDIVNPT#93)

    Co-authored-by: matte22 <mferreira1264@gmail.com>

commit d007792
Author: Mathew <77069472+Matte22@users.noreply.github.com>
Date:   Thu Feb 22 13:28:34 2024 -0500

    test: Create Workflow for unit testing.  (NUWCDIVNPT#92)

commit e398da9
Author: Mathew <77069472+Matte22@users.noreply.github.com>
Date:   Mon Feb 19 17:57:22 2024 -0500

    feat: scan mode history management (NUWCDIVNPT#90)

commit 00f497f
Author: csmig <33138761+csmig@users.noreply.github.com>
Date:   Fri Feb 16 15:37:43 2024 +0000

    feat: pass filename to parsers as sourceRef  (NUWCDIVNPT#91)
@cd-rite cd-rite deleted the addToHistory-migration-pr branch June 10, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants