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 x509-limbo patch and reporting tool #2049

Merged
merged 5 commits into from
Jan 13, 2025

Conversation

skmcgrail
Copy link
Member

@skmcgrail skmcgrail commented Dec 10, 2024

Description of changes:

Describe AWS-LC’s current behavior and how your code changes that behavior. If there are no issues this pr is resolving, explain why this change is necessary.

Call-outs:

  • The majority of the x509-limbo patch is a 1-1 copy of the code from the openssl harness code from that repository. It just has a very limited set of changes to make it compatible with AWS-LC. I'd suggest not wasting your effort into reviewing that code specifically.
  • The Go reporting tool and patch will be built and tested in this PR, but we won't be producing the report output and capturing it / diffing it with the tool until a follow-up PR. I've mostly broken this up to alleviate a large code review for everyone.
  • My current intention is to wire this up into a separate CodeBuild project similar to fuzzing. But for now (since that requires CDK work etc), I have wired-up some simple verification of the patching and the reporting tool into the existing Linux CodeBuild project GitHub Actions CI. This is only temporary.

Testing:

  • I've added plenty of testing to the Go program itself for the functionality the CLI tool relies on for how to produce the reports.
  • Verified the actual CLI commands locally as well.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@skmcgrail skmcgrail requested a review from a team as a code owner December 10, 2024 00:18
@codecov-commenter
Copy link

codecov-commenter commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.75%. Comparing base (39b3fae) to head (a7701e2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2049   +/-   ##
=======================================
  Coverage   78.75%   78.75%           
=======================================
  Files         598      598           
  Lines      103650   103650           
  Branches    14718    14720    +2     
=======================================
  Hits        81633    81633           
+ Misses      21366    21365    -1     
- Partials      651      652    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@skmcgrail skmcgrail force-pushed the x509-limbo-reporting-tool branch 3 times, most recently from 22c6e8f to 63b0742 Compare December 10, 2024 18:53
Copy link
Contributor

@justsmth justsmth left a comment

Choose a reason for hiding this comment

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

I had an issue with the script failing when the dev workspace already has a "build" directory. Otherwise, I just have some nit-picks.

tests/ci/x509/limbo-report/annotate.go Outdated Show resolved Hide resolved
tests/ci/run_x509_limbo.sh Outdated Show resolved Hide resolved
tests/ci/run_x509_limbo.sh Show resolved Hide resolved
@justsmth
Copy link
Contributor

I also noticed this error message.

/bin/sh: 1: [[: not found

I suspect that the Makefile's verify-aws-lc-source target is not working as expected:

.PHONY: verify-aws-lc-source
verify-aws-lc-source:
	@if [[ -z "${AWS_LC_SRC_DIR}" ]]; then \
		echo "AWS_LC_SRC_DIR environment variable is missing and is required to specify AWS-LC source location" && false; \
	fi

@skmcgrail skmcgrail requested a review from justsmth December 24, 2024 17:43
@skmcgrail skmcgrail requested review from andrewhop and removed request for samuel40791765 January 8, 2025 18:00
@@ -0,0 +1,15 @@
.PHONY: all build test fmt vet
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it common to use makefile with go code? Or is this a x509-limbo specific thing?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't have a data source to point towards, but just from experience it tends to be the go to tool to automate multiple actions for invoking, testing, vetting, etc a Go application. The Go compiler itself does a lot of the leg work when you invoke the build sub-command to slurp up the appropriate files etc. Since Make tends to be readily available it tends to be an obvious choice.

@skmcgrail skmcgrail merged commit 6393e80 into aws:main Jan 13, 2025
124 of 126 checks passed
@skmcgrail skmcgrail deleted the x509-limbo-reporting-tool branch January 13, 2025 17:53
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