Skip to content

Harden GitHub Actions Workflow - create-tolk-release.yml #61

Description

@stepsecurity-app

Summary

This issue is created by StepSecurity related to security issues in create-tolk-release.yml . The platform has identified 2 vulnerabilities (1 critical, 0 high, 0 medium, 1 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

❌ Network and runtime security monitoring should be enabled for GitHub-hosted runners

  • Severity: Low

  • Description: This check passes if the step-security/harden-runner GitHub Action is used in a job that runs on a GitHub-hosted runner. Harden-Runner prevents exfiltration of code and CI/CD credentials, and detects tampering of files during build.

  • Resolution: Add the step-security/harden-runner GitHub Action to the job.

  • Automated Remediation Available ?: true

  • References:

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

  • Network and runtime security monitoring should be enabled for GitHub-hosted runners

  name: Create tolk release
  on:
    workflow_dispatch:
      inputs:
        tag:
          description: 'tolk release and tag name'
          required: true
  permissions: write-all
  env:
    GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  jobs:
    create-release:
      runs-on: ubuntu-22.04
      steps:
        - 
+ name: Harden the runner (Audit all outbound calls)
+         uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
+         with:
+           egress-policy: audit
+       - 
  uses: actions/checkout@
+ a37ce9120846195fa4ece8f58b268e6043cb2f26 # 
  v3
+ .7.0
        - name: Download and unzip Linux arm64 artifacts
          uses: dawidd6/action-download-artifact@
+ bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # 
  v6
          with:
            workflow: build-ton-linux-arm64-appimage.yml
            path: artifacts
            workflow_conclusion: success
            branch: master
            skip_unpack: false
        - name: Download and unzip Linux x86-64 artifacts
          uses: dawidd6/action-download-artifact@
+ bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # 
  v6
          with:
            workflow: build-ton-linux-x86-64-appimage.yml
            path: artifacts
            workflow_conclusion: success
            branch: master
            skip_unpack: false
        - name: Download and unzip Mac x86-64 artifacts
          uses: dawidd6/action-download-artifact@
+ bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # 
  v6
          with:
            workflow: build-ton-macos-15-x86-64-portable.yml
            path: artifacts
            workflow_conclusion: success
            branch: master
            skip_unpack: false
        - name: Download and unzip arm64 artifacts
          uses: dawidd6/action-download-artifact@
+ bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # 
  v6
          with:
            workflow: build-ton-macos-14-arm64-portable.yml
            path: artifacts
            workflow_conclusion: success
            branch: master
            skip_unpack: false
        - name: Download and unzip Windows artifacts
          uses: dawidd6/action-download-artifact@
+ bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # 
  v6
          with:
            workflow: ton-x86-64-windows.yml
            path: artifacts
            workflow_conclusion: success
            branch: master
            skip_unpack: false
        - name: Download WASM artifacts
          uses: dawidd6/action-download-artifact@
+ bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # 
  v6
          with:
            workflow: build-ton-wasm-emscripten.yml
            path: artifacts
            workflow_conclusion: success
            branch: master
            skip_unpack: true
        - name: Show all artifacts
          run: |
            tree artifacts
        # create release
        - name: Get registration token
          id: getRegToken
          run: |
            curl -X POST -H \"Accept: application/vnd.github+json\"  -H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' https://api.github.com/repos/ton-blockchain/ton/actions/runners/registration-token
        - name: Create release
          id: create_release
          uses: actions/create-release@
+ 0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # 
  v1
+ .1.4
          env:
            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          with:
            tag_name: ${{ inputs.tag }}
            release_name: ${{ inputs.tag }}
            draft: false
            prerelease: false
        # upload
        # win
        - name: Upload Windows 2019 single artifact - tolk
          uses: svenstaro/upload-release-action@
+ 29e53e917877a24fad85510ded594ab3c9ca12de # 
  v2
          with:
            repo_token: ${{ secrets.GITHUB_TOKEN }}
            file: artifacts/ton-x86-64-windows/tolk.exe
            asset_name: tolk.exe
            tag: ${{ inputs.tag }}
        # mac x86-64
        - name: Upload Mac x86-64 single artifact - tolk
          uses: svenstaro/upload-release-action@
+ 29e53e917877a24fad85510ded594ab3c9ca12de # 
  v2
          with:
            repo_token: ${{ secrets.GITHUB_TOKEN }}
            file: artifacts/ton-x86_64-macos/tolk
            asset_name: tolk-mac-x86-64
            tag: ${{ inputs.tag }}
        # mac arm64
        - name: Upload Mac arm64 single artifact - tolk
          uses: svenstaro/upload-release-action@
+ 29e53e917877a24fad85510ded594ab3c9ca12de # 
  v2
          with:
            repo_token: ${{ secrets.GITHUB_TOKEN }}
            file: artifacts/ton-arm64-macos/tolk
            asset_name: tolk-mac-arm64
            tag: ${{ inputs.tag }}
        # linux x86-64
        - name: Upload Linux x86-64 single artifact - tolk
          uses: svenstaro/upload-release-action@
+ 29e53e917877a24fad85510ded594ab3c9ca12de # 
  v2
          with:
            repo_token: ${{ secrets.GITHUB_TOKEN }}
            file: artifacts/ton-x86_64-linux/tolk
            asset_name: tolk-linux-x86_64
            tag: ${{ inputs.tag }}
        # linux arm64
        - name: Upload Linux arm64 single artifact - tolk
          uses: svenstaro/upload-release-action@
+ 29e53e917877a24fad85510ded594ab3c9ca12de # 
  v2
          with:
            repo_token: ${{ secrets.GITHUB_TOKEN }}
            file: artifacts/ton-arm64-linux/tolk
            asset_name: tolk-linux-arm64
            tag: ${{ inputs.tag }}
        - name: Upload WASM artifacts
          uses: svenstaro/upload-release-action@
+ 29e53e917877a24fad85510ded594ab3c9ca12de # 
  v2
          with:
            repo_token: ${{ secrets.GITHUB_TOKEN }}
            file: artifacts/ton-wasm.zip
            asset_name: ton-wasm.zip
            tag: ${{ inputs.tag }}
        - name: Upload stdlib
          run: |
            mkdir smartcont_lib
            cd smartcont_lib
            cp -r ../artifacts/ton-x86_64-linux/{smartcont,lib} .
            zip -r smartcont_lib.zip .
            gh release upload ${{ inputs.tag }} smartcont_lib.zip

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