Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/changesets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
changesets:
name: Changesets
runs-on: ubuntu-latest
permissions:
contents: read
steps:
# Checkout this repository
- name: Checkout Repo
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
contracts_run_ts_tests:
name: Run Typescript Tests
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout sources
uses: actions/checkout@v5
Expand All @@ -31,6 +33,8 @@ jobs:
contracts_run_cairo_tests:
name: Run Cairo Tests
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout sources
uses: actions/checkout@v5
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
run_examples_tests:
name: Run Tests
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout sources
uses: actions/checkout@v5
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ jobs:
golangci-lint-version:
name: Get golangci-lint version to from nix
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout sources
uses: actions/checkout@v5
Expand All @@ -30,6 +32,8 @@ jobs:
golang_lint_relayer:
name: Golang Lint Relayer
runs-on: ubuntu-latest
permissions:
contents: read
needs: [golangci-lint-version]
steps:
- name: Checkout sources
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/integration_gauntlet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
env:
CI: true
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v5
with:
Expand All @@ -39,6 +41,8 @@ jobs:
integration_gauntlet_run_tests:
name: Run Integration Gauntlet Tests
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout sources
uses: actions/checkout@v5
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
lint_format_check:
name: Format Check
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout sources
uses: actions/checkout@v5
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/relayer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
relayer_run_unit_tests:
name: Run Unit Tests ${{ matrix.test-type.name }}
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/sonar-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ jobs:
wait_for_workflows:
name: Wait for workflows
runs-on: ubuntu-latest
permissions:
contents: read
if: always()
steps:
- name: Checkout Repository
Expand All @@ -31,6 +33,8 @@ jobs:
name: SonarQube Scan
needs: [wait_for_workflows]
runs-on: ubuntu-latest
permissions:
contents: read
if: always()
steps:
- name: Checkout the repo
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
zizmor_analyzer:
name: Zizmor
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout sources
uses: actions/checkout@v5
Expand Down
2 changes: 2 additions & 0 deletions .helm-repositories.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Helm repository config for public charts. Empty password/username fields are intentional -
# these are public chart repositories (bitnami, chainlink-qa, grafana) that do not require authentication.
apiVersion: ''
generated: '0001-01-01T00:00:00Z'
repositories:
Expand Down
23 changes: 20 additions & 3 deletions ops/localenv/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"os/exec"
"strings"
"sync"
"unicode"

"github.com/smartcontractkit/chainlink-starknet/ops/utils"
)
Expand Down Expand Up @@ -87,7 +88,7 @@ func run(name string, f string, args ...string) {
panic(err)
}

// stream output to cmd line
// stream output to cmd line (sanitized to prevent log injection)
var wg sync.WaitGroup
wg.Add(2)
go func() {
Expand All @@ -98,7 +99,7 @@ func run(name string, f string, args ...string) {
wg.Done()
break
}
fmt.Print(string(p[:n]))
fmt.Print(sanitizeForLog(string(p[:n])))
}
}()
go func() {
Expand All @@ -109,7 +110,7 @@ func run(name string, f string, args ...string) {
wg.Done()
break
}
fmt.Print(string(p[:n]))
fmt.Print(sanitizeForLog(string(p[:n])))
}
}()

Expand All @@ -122,3 +123,19 @@ func run(name string, f string, args ...string) {
panic(err)
}
}

// sanitizeForLog replaces control characters to prevent log injection from subprocess output.
func sanitizeForLog(s string) string {
var b strings.Builder
for _, r := range s {
switch {
case r == '\n', r == '\r':
b.WriteString(" ")
case unicode.IsControl(r):
b.WriteString(" ")
default:
b.WriteRune(r)
}
}
return b.String()
}
Loading