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

Add possibility for link in Policy message #1507

Open
xarses opened this issue Apr 15, 2021 · 7 comments
Open

Add possibility for link in Policy message #1507

xarses opened this issue Apr 15, 2021 · 7 comments
Labels
feature New functionality/enhancement Stale

Comments

@xarses
Copy link

xarses commented Apr 15, 2021

We've been playing around with the new policy workflow from #1317

When the Policy comments it gives a message about the execution stats and prints the contents of the name stanza from config (in this case Standard Policies)

image

This comes from

policy:
  policy_sets:
    - name: Standard Policies
      path: /app/policy
      source: local

The problem here, is that there is little information presented to the PR author about what these may mean. Under the current implementation these are shipped with atlantis, and could be quite far from the repository.

Proposal: Add a field that formats as a URL on the PR comment so that Policy creators can link to more information about the test messages

In the meantime, I've simply added a go style path to the name in the hope that our users can get pointed in the right direction

image

@nishkrishnan nishkrishnan added the feature New functionality/enhancement label Apr 18, 2021
@nishkrishnan
Copy link
Contributor

can you not achieve this by just having the link explicitly in the message that gets output from your policy?

@nishkrishnan
Copy link
Contributor

Or are you referring to something outside of the code formatted block

@msarvar
Copy link
Contributor

msarvar commented Apr 18, 2021

I might be wrong here, but I think the intent is to have the link as part of the policy definition. Contest only displays message if policy fails, when it passes it just says that policy check passed. So the customers can read what policies where ran and what they're for regardless if the policy check passes.

@xarses
Copy link
Author

xarses commented Apr 19, 2021

My intent is to have a clickable link somewhere in the message block that enables a user to:

  • find out more about these policy checks in general
  • find out more about specific failure messages

As it stands now, I embedded a non-clickable link into the name of the policy document in the hopes that users are astute enough to realize it will have more information about any failures they may run into

@nishkrishnan
Copy link
Contributor

Right, I think long term we've discussed making comment templates a lot more customizable by service operators to allow for these sorts of things. I'm hesitant to add support for custom messaging for gh comments in the repo config because it opens a can of worms in terms of more feature requests associated with it and more code complexity and maintenance for a hacky solution.

Would like to do this right.

@nishkrishnan
Copy link
Contributor

I'd lean to keeping this issue around: #1026

and solving for this there.

@xarses
Copy link
Author

xarses commented Apr 19, 2021

I'm not against merging the two, but I'm not looking to customize the template per-say. I was thinking that in this case, I'd like to have the data for policy_sets to include a url or something field, that would get rendered with the evaluated policy. I was also thinking that the policy_sets' name would actually be rendered outside the codeblock to help support this information as its probable that we will soon have a policy_set that is owned by the security or compliance team that will have its own information.

That all said, it would still be a move in the right direction to customize the block to point to the overall documentation

@dosubot dosubot bot added the Stale label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality/enhancement Stale
Projects
None yet
Development

No branches or pull requests

3 participants