-
Notifications
You must be signed in to change notification settings - Fork 7
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
Secrel Decoupling #2870
Secrel Decoupling #2870
Conversation
JaCoCo Test Coverage
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sounds and looks just like I hoped it would. Thanks for making this happen and for communicating the significance of this enhancement so clearly. The only other question I had was whether we need to be handling the case where images have already been signed? This might be adding scope to this ticket, and if so, we can answer with a new backlog item. But what i was thinking is something like this:
# Perform signature verification
if docker trust inspect --pretty --signer <SIGNER_NAME> ${{ github.repository }}:${{ github.sha }}; then
echo "Image is signed by expected signer"
echo "::set-output name=signature_verified::true"
else
echo "Image is not signed by expected signer"
echo "::set-output name=signature_verified::false"
fi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice work @msnwatson . Excited to try this out!
So I actually would not want to skip signing a new image that has already been signed in the past because SecRel signatures do expire an I'm not sure I'd have access to all that information from this script. As far as I know, there are no downsides to signing images multiple times beyond just computation time in the SecRel pipeline which we haven't had a need to optimize at this point. |
72df4a7
to
e8d4c03
Compare
This reverts commit 102932c.
* first pass at changing secrel to be more decoupled * work on syntax error * put secrel inputs step in separate script * change conditions * checkout repo in secrel-inputs step * add back double bracing * add space in braces * move script back * add gate step * change run conditions * add debug echo statement * change form of run condition * change form of run condition * change form of run condition * change form of run condition * change form of run condition * change form of run condition * change form of run condition * change form of run condition * change form of run condition * change form of run condition * change form of run condition * change form of run condition * change form of run condition * change form of run condition * change form of run condition * change form of run condition * change form of run condition * update list
After the changes in my PR, users of the SecRel workflow can choose to run existing images through SecRel, unrelated of when those images were published. For instance, a common issue that we used to face with running SecRel was that if there were no changes made from the last time SecRel ran, then SecRel would not run as there would be no new images published to be fed into the next step of the workflow. However, now images can be published in one run of the workflow, and then future runs of the workflow can perform SecRel scanning as many times as the user desires.
Essentially, the changes allow for publishing to be skipped and only SecRel performed whereas historically we only allowed for skipping secrel but always required image publishing as the images published were fed directly into the SecRel pipeline. Now, any published image can be fed into the SecRel pipeline.
On PR merge to
develop
, image publishing and SecRel will continue to run in the same way it has historically: publishing all images and running SecRel on all of them simultaneously.With these changes, partner team engineers could select only their images for a SecRel run, decoupling their SecRel Aqua image scanning from the rest of the platform. This means that even if there are vulnerabilities found on VRO images, if the EE team’s images passes SecRel, deployment of EE team’s applications could continue to all environments without interruption. The same goes for any VRO images that we seek to deploy. Any image can be deployed with a passing Aqua status, even if other images in the platform do not pass Aqua.
Snyk and SDE alerts must continue to pass or block deployment across the whole platform; however, Aqua is the most frequent offender in terms of deployment blockers and SecRel failures.
In the short-term, VRO team will need to continue to manage SecRel on behalf of our partner teams, as there will definitely be an education component. However, these changes get us closer to partner teams being able to manage their own images’ SecRel statuses and to partner teams being able to perform their own deployments to LHDI environments that require SecRel-signed images.
The changes will be available for use as soon as the PR containing the changes is merged. The changes can be easily reverted through a quick PR reversion. This work does not seem to be impacted at all by the recent work on removing versioning, beyond simplifying the mental model of the process.
Associated tickets or Slack threads:
How to test this PR
develop
branch