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 GitHub known TLS thumbprints #151

Merged
merged 3 commits into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This module configures an OIDC provider for use with GitHub actions.
resource "aws_iam_openid_connect_provider" "github_actions" {
client_id_list = ["sts.amazonaws.com"]
thumbprint_list = data.tls_certificate.github.certificates[*].sha1_fingerprint
thumbprint_list = distinct(concat(data.tls_certificate.github.certificates[*].sha1_fingerprint, var.github_known_thumbprints))
url = "https://token.actions.githubusercontent.com"
tags = var.tags_common
}
1 change: 1 addition & 0 deletions test/unit-test/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ data "aws_iam_policy_document" "extra_permissions" {
#checkov:skip=CKV_AWS_108
#checkov:skip=CKV_AWS_109
#checkov:skip=CKV_AWS_111
#checkov:skip=CKV_AWS_356 skipping check as this code is used in a unit test, not production
version = "2012-10-17"

statement {
Expand Down
9 changes: 9 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
variable "github_known_thumbprints" {
type = list(string)
description = "The known intermediary thumbprints for the GitHub OIDC provider"
default = [
"1c58a3a8518e8759bf075b76b750d4f2df264fcd",
"6938fd4d98bab03faadb97b34396831e3780aea1"
]
}

variable "github_repositories" {
type = list(string)
description = "The github repositories, for example [\"ministryofjustice/modernisation-platform-environments:*\"]"
Expand Down