Skip to content

Conversation

stevenhorsman
Copy link
Member

Having secrets unconditionally being inherited is
bad practice, so update the workflows to only pass through the minimal secrets that are needed

@stevenhorsman
Copy link
Member Author

@stevenhorsman stevenhorsman changed the title WIP: workflows: Replace secrets: inherit workflows: Replace secrets: inherit May 29, 2025
@stevenhorsman stevenhorsman force-pushed the remove-inherit-secrets branch from e14806b to 8c8b9ba Compare May 29, 2025 15:44
@stevenhorsman stevenhorsman mentioned this pull request May 29, 2025
25 tasks
Copy link
Member

@fidencio fidencio left a comment

Choose a reason for hiding this comment

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

Oh, this is nice.

I wonder if this is something that's new-ish, as I really don't remember an option to do so when we moved to GHA.

Thanks, @stevenhorsman, for improving this!

@stevenhorsman stevenhorsman marked this pull request as draft June 5, 2025 09:58
@stevenhorsman
Copy link
Member Author

I'm going to convert this to a draft as I think there is an opportunity to move some secrets to envs and delete others as part of this work

@stevenhorsman stevenhorsman force-pushed the remove-inherit-secrets branch 5 times, most recently from aaf65c7 to d1284eb Compare June 5, 2025 11:24
@stevenhorsman
Copy link
Member Author

I've added a pre-req on #11383 for cleaner code here

@stevenhorsman stevenhorsman force-pushed the remove-inherit-secrets branch from d1284eb to e59882a Compare June 5, 2025 14:49
@stevenhorsman
Copy link
Member Author

I've also update this to switch the Azure secrets to vars now.

@stevenhorsman stevenhorsman force-pushed the remove-inherit-secrets branch from e59882a to 3da9017 Compare June 5, 2025 16:17
@stevenhorsman
Copy link
Member Author

@stevenhorsman stevenhorsman marked this pull request as ready for review June 5, 2025 16:18
Copy link
Member

@RuoqingHe RuoqingHe left a comment

Choose a reason for hiding this comment

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

Great work - thanks @stevenhorsman ❤️

AUTHENTICATED_IMAGE_USER isn't sensitive, so
update the secret for a var to simplify the workflows

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
QUAY_DEPLOYER_USERNAME isn't sensitive, so update the secret for a var to simplify the workflows

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
@stevenhorsman stevenhorsman marked this pull request as draft June 6, 2025 08:49
@stevenhorsman
Copy link
Member Author

It has now been decided that the Azure IDs should infact be secrets again, so I'll move this into draft whilst I undo a bunch of work and re-test it.

Having secrets unconditionally being inherited is
bad practice, so update the workflows to only pass
through the minimal secrets that are needed

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
@stevenhorsman stevenhorsman force-pushed the remove-inherit-secrets branch from 3da9017 to 66ef1c1 Compare June 6, 2025 08:56
@stevenhorsman stevenhorsman marked this pull request as ready for review June 6, 2025 13:08
@stevenhorsman
Copy link
Member Author

@stevenhorsman stevenhorsman requested a review from sprt June 6, 2025 13:08
@sprt
Copy link
Contributor

sprt commented Jun 6, 2025

It has now been decided that the Azure IDs should infact be secrets again, so I'll move this into draft whilst I undo a bunch of work and re-test it.

Indeed. These IDs are not confidential but this is to follow official docs. I will rotate the IDs.

@stevenhorsman stevenhorsman merged commit 31a8944 into main Jun 6, 2025
227 of 235 checks passed
@stevenhorsman stevenhorsman deleted the remove-inherit-secrets branch June 6, 2025 15:41
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.

4 participants