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

Question regarding the github app privatekey in fixtures.go #2630

Closed
haarchri opened this issue Nov 1, 2022 · 4 comments
Closed

Question regarding the github app privatekey in fixtures.go #2630

haarchri opened this issue Nov 1, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@haarchri
Copy link

haarchri commented Nov 1, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Overview of the Issue

We recently had a security audit and the private key in fixtures.go was flagged.

For what reason does atlantis have a github app privatekey here in the repo?

const GithubPrivateKey = `-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAuEPzOUE+kiEH1WLiMeBytTEF856j0hOVcSUSUkZxKvqczkWM
9vo1gDyC7ZXhdH9fKh32aapba3RSsp4ke+giSmYTk2mGR538ShSDxh0OgpJmjiKP
X0Bj4j5sFqfXuCtl9SkH4iueivv4R53ktqM+n6hk98l6hRwC39GVIblAh2lEM4L/
6WvYwuQXPMM5OG2Ryh2tDZ1WS5RKfgq+9ksNJ5Q9UtqtqHkO+E63N5OK9sbzpUUm
oNaOl3udTlZD3A8iqwMPVxH4SxgATBPAc+bmjk6BMJ0qIzDcVGTrqrzUiywCTLma
szdk8GjzXtPDmuBgNn+o6s02qVGpyydgEuqmTQIDAQABAoIBACL6AvkjQVVLn8kJ
dBYznJJ4M8ECo+YEgaFwgAHODT0zRQCCgzd+Vxl4YwHmKV2Lr+y2s0drZt8GvYva
KOK8NYYZyi15IlwFyRXmvvykF1UBpSXluYFDH7KaVroWMgRreHcIys5LqVSIb6Bo
gDmK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c98UGlt48OdWu
-----END RSA PRIVATE KEY-----

Reproduction Steps

Logs

Environment details

Additional Context

@haarchri haarchri added the bug Something isn't working label Nov 1, 2022
@nitrocode
Copy link
Member

Looks like for testing. What are your concerns @haarchri ?

This was the original PR

#1088

@jamengual @chenrui333 could you folks add additional context here?

Once we have a full understanding, we can add a comment in the code to alleviate future concerns.

@haarchri
Copy link
Author

haarchri commented Nov 3, 2022

We had a Security Audit and the Code is with a PrivateKey ;) - thats why i wanted clarification

@nitrocode nitrocode changed the title privatekey in fixtures.go#L396-L422 Question regarding the github app privatekey in fixtures.go Nov 3, 2022
@jamengual
Copy link
Contributor

I have no recollection of this.

@lkysow do you remember?

@nitrocode
Copy link
Member

nitrocode commented Dec 16, 2022

@haarchri all the references to that variable are all for testing

https://github.com/search?q=repo%3Arunatlantis%2Fatlantis%20GithubPrivateKey&type=code

Key: []byte(testdata.GithubPrivateKey),

GHAppKeyFlag: testdata.GithubPrivateKey,

Key: []byte(testdata.GithubPrivateKey),

Perhaps it would alleviate concerns if we documented that in the code?

Recently the module has been renamed from fixtures to testdata

const GithubPrivateKey = `-----BEGIN RSA PRIVATE KEY-----

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants