<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>61240</bug_id>
          
          <creation_ts>2026-10-27 15:59:24 +0300</creation_ts>
          <short_desc>Cекрет из ${{ secrets.* }} попдает в поле step без маскирования</short_desc>
          <delta_ts>2026-10-27 15:59:24 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>gitea-runner</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Блинов Денис Вячеславович">blinovdv</reporter>
          <assigned_to name="Alexey Shabalin">shaba</assigned_to>
          <cc>shaba</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>303495</commentid>
    <comment_count>0</comment_count>
    <who name="Блинов Денис Вячеславович">blinovdv</who>
    <bug_when>2026-10-27 15:59:24 +0300</bug_when>
    <thetext>Версия пакета:
gitea-runner-5.0.0-alt1.x86_64

Условия:
Установлен git и установлен gitea-runner.
Gitea-сервер и регистрация не нужны: используется локальный gitea-runner exec.
Секрет передаётся через -s MY_SECRET=supersecret123 (аналог секрета Gitea в локальном прогоне).

Шаги:
Создать локальный workflow с двумя job: в первом шаг без name, во втором с name:

# rm -rf /tmp/execcase &amp;&amp; mkdir -p /tmp/execcase/.gitea/workflows &amp;&amp; cd /tmp/execcase
# git init -b main &amp;&amp; git config user.name tester &amp;&amp; git config user.email test@example.com
# cat &gt; .gitea/workflows/secret.yaml &lt;&lt;&apos;EOF&apos;
name: Secret
on: [push]
jobs:
  s:
    runs-on: host
    steps:
      - run: echo &quot;SECRET=${{ secrets.MY_SECRET }}&quot;
  s2:
    runs-on: host
    steps:
      - name: show secret
        run: echo &quot;SECRET=${{ secrets.MY_SECRET }}&quot;
EOF
# git add -A &amp;&amp; git commit -m x &amp;&amp; git remote add origin https://example.com/x/y.git

Запустить job s (шаг без name) в JSON-режиме:

# gitea-runner exec -C /tmp/execcase -W .gitea/workflows -j s -i -self-hosted \
    -s MY_SECRET=supersecret123 --json 2&gt;&amp;1 | grep -E &apos;&quot;step&quot;|&quot;msg&quot;&apos;

Ожидаемый результат: Секрет должен маскироваться во всех полях вывода --json
Реальный результат: В поле msg секрет замаскирован, но в поле step открытым текстом:
{&quot;...&quot;,&quot;msg&quot;:&quot;::group::Run echo \&quot;SECRET=***\&quot;&quot;,&quot;raw_output&quot;:true,&quot;stage&quot;:&quot;Main&quot;,&quot;step&quot;:&quot;echo \&quot;SECRET=supersecret123\&quot;&quot;,&quot;stepID&quot;:[&quot;0&quot;],&quot;stepNumber&quot;:0,...}
{&quot;...&quot;,&quot;msg&quot;:&quot;echo \&quot;SECRET=***\&quot;&quot;,&quot;raw_output&quot;:true,&quot;stage&quot;:&quot;Main&quot;,&quot;step&quot;:&quot;echo \&quot;SECRET=supersecret123\&quot;&quot;,&quot;stepID&quot;:[&quot;0&quot;],&quot;stepNumber&quot;:0,...}
{&quot;...&quot;,&quot;msg&quot;:&quot;SECRET=***\n&quot;,&quot;raw_output&quot;:true,&quot;stage&quot;:&quot;Main&quot;,&quot;step&quot;:&quot;echo \&quot;SECRET=supersecret123\&quot;&quot;,&quot;stepID&quot;:[&quot;

Варианты запуска без утечек секрета:
Запустить тот же job в обычном (не-JSON) режиме:
# gitea-runner exec -C /tmp/execcase -W .gitea/workflows -j s -i -self-hosted \
    -s MY_SECRET=supersecret123 2&gt;&amp;1 | grep -E &apos;SECRET|supersecret&apos;
Запустить job s2 (шаг с name) в JSON-режиме:
# gitea-runner exec -C /tmp/execcase -W .gitea/workflows -j s2 -i -self-hosted \
    -s MY_SECRET=supersecret123 --json 2&gt;&amp;1 | grep -E &apos;&quot;step&quot;|&quot;msg&quot;&apos;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>