Skip to content

Harden GitHub Actions Workflow - build-ton-linux-x86-64-shared.yml #68

Description

@stepsecurity-app

Summary

This issue is created by StepSecurity related to security issues in build-ton-linux-x86-64-shared.yml . The platform has identified 1 vulnerability (1 critical, 0 high, 0 medium, 0 low).

Remediation Overview

The platform can generate remediations for a few vulnerabilities. For such vulnerabilities, you can find the fixed workflow file in the Suggested Fix For Auto-Remediable Issues section. You can manually deploy these changes or create a pull request by commenting @stepsecurity-app pull-request create on this issue.

If you’d like an automated pull request with the fixed workflow file, comment:

@stepsecurity-app pull-request create

Other issues require manual investigation and changes.

Once a vulnerability has been remediated, ✅ will appear in the title. Note that it may take up to 24 hours for these issues to be updated.

Please review the individual vulnerability section below and follow the recommended resolution steps.

Security Checks Details

❌ Actions should be pinned to a full-length commit SHA

Suggested Fix For Auto-Remediable Issues

Below is the updated workflow, which fixes the following security vulnerabilities:

  • Actions should be pinned to a full-length commit SHA
  name: Ubuntu TON build (shared, x86-64)
  on: [push, pull_request, workflow_dispatch, workflow_call]
  jobs:
    build:
      strategy:
        fail-fast: false
        matrix:
          os: [ubuntu-22.04, ubuntu-24.04]
      runs-on: ${{ matrix.os }}
      steps:
      - name: Check out repository
        uses: actions/checkout@
+ a37ce9120846195fa4ece8f58b268e6043cb2f26 # 
  v3
+ .7.0
        with:
          submodules: 'recursive'
      - name: Date Stamp
        shell: bash
        id: date-stamp
        run: |
          echo "timestamp=$(date -u "+%Y%m%d%H%M_%S")" >> "$GITHUB_OUTPUT"
      - name: Install system libraries
        run: |
          sudo apt-get update
          sudo apt-get install -y build-essential git cmake ninja-build zlib1g-dev libsecp256k1-dev libmicrohttpd-dev libsodium-dev liblz4-dev libjemalloc-dev ccache
          mkdir ~/.ccache
      - if: matrix.os != 'ubuntu-24.04'
        run: |
          wget https://apt.llvm.org/llvm.sh
          chmod +x llvm.sh
          sudo ./llvm.sh 16 clang
      - name: Cache OpenSSL
        id: cache-openssl
        uses: actions/cache@
+ 0057852bfaa89a56745cba8c7296529d2fc39830 # 
  v4
+ .3.0
        with:
          path: openssl_3
          key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.os }}-openssl_3-${{ hashFiles('**/assembly/native/build-ubuntu-shared.sh') }}
      - name: Restore cache TON
        uses: actions/cache@
+ 0057852bfaa89a56745cba8c7296529d2fc39830 # 
  v4
+ .3.0
        with:
          path: ~/.ccache
          key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.os }}-shared-ccache-${{ steps.date-stamp.outputs.timestamp }}
          restore-keys: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.os }}-shared-ccache
      - name: Build TON
        run: |
          git submodule sync --recursive
          git submodule update
          cp assembly/native/build-ubuntu-shared.sh .
          chmod +x build-ubuntu-shared.sh
          ./build-ubuntu-shared.sh -t -c
          ccache -sp
      - name: Run unit tests
        run: |
          cd build
          ctest --output-on-failure --timeout 1800
      - name: Prepare Python environment
        run: |
          curl -LsSf https://astral.sh/uv/install.sh | sh
          uv sync --no-dev
          uv run test/tontester/generate_tl.py
      - name: Run tontester tests
        run: |
          uv run pytest
      - name: Run integration tests
        run: |
          for script in test/integration/*.py; do
            echo $script
            uv run $script
          done
      - name: Run tonlib integration test
        run: |
          ./test/tonlib/integration/test_integration.sh

Additional Information

For more information, refer to the documentation page here.
Please don't make any changes in the description as the platform makes automated updates in description. Please use the comment section below to provide input.

Automated remediation commands and options
  • Create a pull request with automated security fixes
@stepsecurity-app pull-request create
  • Close this issue and prevent it from being reopened
@stepsecurity-app issue close <REASON>
  • Update issue description with latest security check status
@stepsecurity-app issue force-update
  • View all available commands and their usage
@stepsecurity-app help
Which GitHub Actions security best practices were evaluated?

The workflow was evaluated for the following GitHub Actions security best practices:

  • Network & runtime security monitoring
  • Token permissions
  • Third‐party GitHub Actions usage & pinning

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions