Skip to content

Add versioned outcomes schema - #672

Merged
ahouseholder merged 3 commits into
CERTCC:mainfrom
sei-vsarvepalli:feature/issue_589
Jan 24, 2025
Merged

ahouseholder merged 3 commits into
CERTCC:mainfrom
sei-vsarvepalli:feature/issue_589

Conversation

@sei-vsarvepalli

Copy link
Copy Markdown
Contributor

This is an attempt to move towards Policy Explorer which requires Outcomes and resolves #589 so we have a schema for the outcome groups.

Here is what has happened

  1. Outcomes Schema description under data/schema/v1 and data/schema/current (symlink)
  2. Outcomes JSON files under data/json/outcomes
  3. Create CVSS Vectors that were predefined to create JSON format in data/json/decision_points/cvss/
  4. Scripts to create CVSS decision_points and Outcomes in data/json/outcomes

Mostly additions should not disturb any setup.

@ahouseholder ahouseholder left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm fine with the bulk of this PR as-is. My only to blockers to merge are:

  • do we need data/json/decision_points.zip?
  • do we need src/ssvc/gini_impurity.py

both of these seem out of place to me.

Comment thread data/json/decision_points.zip Outdated
Comment thread src/cvss_to_json.py Outdated
#user_interaction USER_INTERACTION_2
print(mod, dp)
sdp = getattr(module, dp)
f = open(f"../data/json/decision_points/cvss/{dp.lower()}.json", "w")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Purely a syntactical note, not worth changing, just mentioning it since I noticed it here.

with open("...","w") as f:
    f.write("foo")

does the same thing but you don't have to explicitly close() because the context manager handles it for you.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

will do with syntax...

Comment thread src/cvss_to_json.py
Comment thread src/ssvc/gini_impurity.py Outdated
@ahouseholder

Copy link
Copy Markdown
Contributor

Also note that we'll need to do a brief reconciliation of #674 with this one, just depends on merge order which one will need to change.

@ahouseholder ahouseholder changed the title Feature/issue 589 Add versioned outcomes schema Jan 24, 2025
@ahouseholder
ahouseholder merged commit e95399a into CERTCC:main Jan 24, 2025
@ahouseholder ahouseholder added this to the 2025-03 milestone Feb 19, 2025
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.

Need json schema for outcome groups

2 participants