-
Notifications
You must be signed in to change notification settings - Fork 0
FIPS compliant v3.5.17-dd.3 build
#10
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
Changes from all commits
799d248
204ae64
a033891
e2c2a0f
1bb7e72
d546bb3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,18 +8,69 @@ on: | |
| - "*-dd*" | ||
| permissions: write-all | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| build-amd64: | ||
| strategy: | ||
| matrix: | ||
| platform: ["linux/amd64"] | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Set release version environment variable | ||
| run: echo RELEASE_VERSION=${GITHUB_REF#refs/tags/} >> $GITHUB_ENV | ||
| - name: Set environment variables | ||
| id: set_env | ||
| run: | | ||
| echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | ||
| echo "TARGET_OS=$(echo ${{ matrix.platform }} | cut -d'/' -f1)" >> $GITHUB_ENV | ||
| echo "TARGET_ARCH=$(echo ${{ matrix.platform }} | cut -d'/' -f2)" >> $GITHUB_ENV | ||
| env: | ||
| GITHUB_REF: ${{ github.ref }} | ||
| - name: Build etcd | ||
| run: | | ||
| REPOSITORY=https://github.com/${{ env.GITHUB_REPOSITORY }}.git \ | ||
| CGO_ENABLED=1 \ | ||
| GOEXPERIMENT=boringcrypto \ | ||
| GO_BUILD_FLAGS="-tags=fips" \ | ||
| TARGET_OS=${TARGET_OS} \ | ||
| TARGET_ARCH=${TARGET_ARCH} \ | ||
| ./scripts/build-binary-single-target ${{ env.RELEASE_VERSION }} | ||
| env: | ||
| GITHUB_REPOSITORY: ${{ github.repository }} | ||
| - name: Calculate checksums | ||
| id: calculate_checksums | ||
| shell: bash | ||
| working-directory: release/ | ||
| run: ls . | grep -E '\.tar.gz$|\.zip$' | xargs shasum -a 256 > ./SHA256SUMS | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: etcd_output_amd64 | ||
| path: release/ | ||
| build-arm64: | ||
| strategy: | ||
| matrix: | ||
| platform: ["linux/arm64"] | ||
| runs-on: ubuntu-24.04-arm | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 Code VulnerabilityWorkflow depends on a GitHub actions pinned by tag instead of a hash. (...read more)Pin GitHub Actions by commit hash to ensure supply chain security. Using a branch ( - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
||
| with: | ||
| fetch-depth: 0 | ||
| - name: Set environment variables | ||
| id: set_env | ||
| run: | | ||
| echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | ||
| echo "TARGET_OS=$(echo ${{ matrix.platform }} | cut -d'/' -f1)" >> $GITHUB_ENV | ||
| echo "TARGET_ARCH=$(echo ${{ matrix.platform }} | cut -d'/' -f2)" >> $GITHUB_ENV | ||
| env: | ||
| GITHUB_REF: ${{ github.ref }} | ||
| - name: Build etcd | ||
| run: REPOSITORY=https://github.com/${{ env.GITHUB_REPOSITORY}}.git ./scripts/build-binary ${{ env.RELEASE_VERSION }} | ||
| run: | | ||
| REPOSITORY=https://github.com/${{ env.GITHUB_REPOSITORY }}.git \ | ||
| CGO_ENABLED=1 \ | ||
| GOEXPERIMENT=boringcrypto \ | ||
| GO_BUILD_FLAGS="-tags=fips" \ | ||
| TARGET_OS=${TARGET_OS} \ | ||
| TARGET_ARCH=${TARGET_ARCH} \ | ||
| ./scripts/build-binary-single-target ${{ env.RELEASE_VERSION }} | ||
| env: | ||
| GITHUB_REPOSITORY: ${{ github.repository }} | ||
| - name: Calculate checksums | ||
|
|
@@ -29,13 +80,13 @@ jobs: | |
| run: ls . | grep -E '\.tar.gz$|\.zip$' | xargs shasum -a 256 > ./SHA256SUMS | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: etcd_output | ||
| name: etcd_output_arm64 | ||
| path: release/ | ||
| release: | ||
| permissions: | ||
| contents: write | ||
| runs-on: ubuntu-latest | ||
| needs: build | ||
| needs: [build-amd64, build-arm64] | ||
| outputs: | ||
| upload_url: ${{ steps.create_release_branch.outputs.upload_url }}${{ steps.create_release_tags.outputs.upload_url }} | ||
| steps: | ||
|
|
@@ -78,26 +129,32 @@ jobs: | |
| release_name: ${{ steps.extract_tags.outputs.tags }} | ||
| draft: false | ||
| prerelease: false | ||
| releaseassetsarm: | ||
| releaseassets: | ||
| runs-on: ubuntu-latest | ||
| needs: release | ||
| strategy: | ||
| matrix: | ||
| platform: ["linux-arm64","linux-amd64"] | ||
| extension: ["tar.gz"] | ||
| steps: | ||
| - uses: actions/download-artifact@v4 | ||
| - name: Set artifact name | ||
| id: set_artifact | ||
| run: | | ||
| if [[ "${{ matrix.platform }}" == *"arm64"* ]]; then | ||
| echo "ARTIFACT_NAME=etcd_output_arm64" >> $GITHUB_ENV | ||
| else | ||
| echo "ARTIFACT_NAME=etcd_output_amd64" >> $GITHUB_ENV | ||
| fi | ||
| - name: Download artifacts | ||
| uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | ||
| with: | ||
| name: etcd_output | ||
| name: ${{ env.ARTIFACT_NAME }} | ||
| path: _output/release-tars | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Set release version environment variable | ||
| run: echo RELEASE_VERSION=${GITHUB_REF#refs/tags/} >> $GITHUB_ENV | ||
| env: | ||
| GITHUB_REF: ${{ github.ref }} | ||
| - name: Display structure of downloaded files | ||
| run: ls -R | ||
| working-directory: _output | ||
| - name: Upload Release Asset | ||
| id: upload-release-asset | ||
| uses: actions/upload-release-asset@v1 | ||
|
|
@@ -112,11 +169,16 @@ jobs: | |
| runs-on: ubuntu-latest | ||
| needs: release | ||
| steps: | ||
| - uses: actions/download-artifact@v4 | ||
| - name: Create output directory | ||
| run: mkdir -p _output/checksums | ||
| - name: Download all artifacts | ||
| uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | ||
| with: | ||
| name: etcd_output | ||
| path: _output/checksums | ||
| path: _output/artifacts | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Combine checksums | ||
| run: | | ||
| find _output/artifacts -name "SHA256SUMS" -exec cat {} \; > _output/checksums/SHA256SUMS | ||
| - name: Upload checksums | ||
| id: upload-checksums | ||
| uses: actions/upload-release-asset@v1 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 1.22.9 | ||
| 1.23.7 | ||
|
badouralix marked this conversation as resolved.
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| //go:build fips | ||
|
|
||
| package main | ||
|
|
||
| // enforce fips compliance if boringcrypto is enabled | ||
| import _ "crypto/tls/fipsonly" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| //go:build fips | ||
|
|
||
| package main | ||
|
|
||
| // enforce fips compliance if boringcrypto is enabled | ||
| import _ "crypto/tls/fipsonly" |
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.
🟠 Code Vulnerability
Workflow depends on a GitHub actions pinned by tag instead of a hash. (...read more)
Pin GitHub Actions by commit hash to ensure supply chain security.
Using a branch (
@main) or tag (@v1) allows for implicit updates, which can introduce unexpected or malicious changes. Instead, always pin actions to a full length commit SHA. You can find the commit SHA for the latest tag from the action’s repository and ensure frequent updates via auto-updaters such as dependabot. Include a comment with the corresponding full-length SemVer tag for clarity: