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

chore: Add issue remediation to test output [CFG-2124] #3801

Merged
merged 1 commit into from
Sep 5, 2022

Conversation

ofekatr
Copy link
Contributor

@ofekatr ofekatr commented Sep 1, 2022

What does this PR do?

  • Includes the one-liner remediation advices from policy-engine for any issues in the test output in all relevant output formats:
  • Text
  • JSON
  • SARIF

How should this be manually tested?

  • Run snyk iac test --experimental and ensure any displayed issues include the expected one-liner remediation advice.
  • Run snyk iac test --experimental --json and ensure any displayed issues include the expected one-liner remediation advice.
  • Run snyk iac test --experimental --sarif and ensure any displayed issues include the expected one-liner remediation advice.

Any background context you want to provide?

A proposal was approved to keep the one-liner format for security rules. In the new format, the remediation property is a dictionary that maps project types to their respective remediation advice. In each remediation advice, the first paragraph is a one-liner version that summarizes the recommended actions. The changes were applied (PR) and are available through policy-engine.

What are the relevant tickets?

@ofekatr ofekatr force-pushed the chore/add-issue-remediation-cfg-2124 branch 3 times, most recently from 9cef9aa to 2cd99d7 Compare September 1, 2022 15:05
@ofekatr ofekatr requested a review from ipapast September 1, 2022 15:07
@ofekatr ofekatr marked this pull request as ready for review September 1, 2022 15:07
@ofekatr ofekatr requested a review from a team as a code owner September 1, 2022 15:07
src/lib/iac/test/v2/json.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@ipapast ipapast left a comment

Choose a reason for hiding this comment

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

nice one 🙌

@ofekatr ofekatr force-pushed the chore/add-issue-remediation-cfg-2124 branch from 2cd99d7 to 3fa6b91 Compare September 5, 2022 07:53
@ofekatr ofekatr merged commit 7dbca62 into master Sep 5, 2022
@ofekatr ofekatr deleted the chore/add-issue-remediation-cfg-2124 branch September 5, 2022 08:31
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.

2 participants