Skip to content
Merged
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
642 changes: 0 additions & 642 deletions .github/workflows/ci.yml

This file was deleted.

628 changes: 624 additions & 4 deletions .github/workflows/release.yml

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Security

on:
pull_request:
types: [opened, reopened, synchronize]

permissions:
contents: read

jobs:
gosec:
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Run Gosec Security Scanner
uses: securego/gosec@v2.25.0
Comment thread
digitalghost-dev marked this conversation as resolved.
with:
args: '-severity medium -confidence medium ./...'

bandit:
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'

- name: Install uv
uses: astral-sh/setup-uv@v7

- name: Run Bandit Security Scanner
run: |
uv tool run --from 'bandit[toml]' bandit \
-r data_platform/pipelines \
--severity-level medium \
--confidence-level medium
3 changes: 3 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ changelog:
exclude:
- "^docs:"
- "^test:"
- "^ci:"
- "^chore:"
- "^build:"

homebrew_casks:
- name: poke-cli
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ FROM rust:1-alpine AS rust-build

WORKDIR /build

# hadolint ignore=DL3018
RUN apk add --no-cache build-base

COPY services/Cargo.toml services/Cargo.lock ./services/
Expand All @@ -26,6 +27,7 @@ RUN cargo build --release --manifest-path services/Cargo.toml --bin poke-cache
FROM alpine:3.24

# Installing only necessary packages and remove them after use
# hadolint ignore=DL3018
RUN apk add --no-cache shadow && \
addgroup -S poke_group && adduser -S poke_user -G poke_group && \
sed -i 's/^root:.*/root:!*:0:0:root:\/root:\/sbin\/nologin/' /etc/passwd && \
Expand Down
2 changes: 1 addition & 1 deletion cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func runCLI(args []string) int {
var exit = os.Exit

func isInteractive() bool {
return term.IsTerminal(int(os.Stdin.Fd())) && term.IsTerminal(int(os.Stdout.Fd()))
return term.IsTerminal(int(os.Stdin.Fd())) && term.IsTerminal(int(os.Stdout.Fd())) // #nosec G115
}

func saveConfig(cfg flags.Config) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/types/damage_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func DamageTable(typesName string, endpoint string) (string, error) {
out.WriteString(styling.StyleBold.Render("Damage Chart:"))
out.WriteString("\n")

physicalWidth, _, _ := term.GetSize(uintptr(int(os.Stdout.Fd())))
physicalWidth, _, _ := term.GetSize(uintptr(int(os.Stdout.Fd()))) // #nosec G115
doc := strings.Builder{}

// Helper function to build list items
Expand Down
6 changes: 3 additions & 3 deletions cmd/utils/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ func Open(url string) tea.Cmd {
switch runtime.GOOS {
case "windows":
browserCmd = "cmd"
openCmd = exec.Command("cmd", "/c", "start", url) //nolint:gosec
openCmd = exec.Command("cmd", "/c", "start", url) // #nosec G204
case "darwin":
browserCmd = "open"
openCmd = exec.Command("open", url)
openCmd = exec.Command("open", url) // #nosec G204
default:
browserCmd = "xdg-open"
openCmd = exec.Command("xdg-open", url)
openCmd = exec.Command("xdg-open", url) // #nosec G204
}

if _, err := exec.LookPath(browserCmd); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion connections/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func cachedFetch(url string) ([]byte, error) {
warnNoCache()
return directFetch(url)
}
out, err := exec.Command(path, "get", url).Output()
out, err := exec.Command(path, "get", url).Output() // #nosec G204
if err != nil {
return directFetch(url)
}
Expand Down
2 changes: 1 addition & 1 deletion docs/Infrastructure_Guide/local-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ The above `yml` defines the structure for the raw `series` table from the `stagi
Soda and its components needed for the project can be installed with `uv`:

1. Install Soda Core with PostgreSQL connector since Supabase uses PostgreSQL.
Other [connectors](https://github.com/sodadata/soda-core/blob/main/docs/installation.md#compatibility) can be used.
Other [connectors](https://github.com/sodadata/soda-core/blob/v3/docs/installation.md#compatibility) can be used.
```shell
uv add soda-core-postgres
```
Expand Down
4 changes: 2 additions & 2 deletions flags/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func Load() (Config, bool, error) {

func LoadFrom(path string) (Config, bool, error) {
cfg := Defaults()
data, err := os.ReadFile(path)
data, err := os.ReadFile(path) // #nosec G304
if errors.Is(err, fs.ErrNotExist) {
return cfg, true, nil
}
Expand Down Expand Up @@ -105,7 +105,7 @@ func SaveTo(path string, cfg Config) error {
return err
}
dir := filepath.Dir(path)
if err := os.MkdirAll(dir, 0o755); err != nil {
if err := os.MkdirAll(dir, 0o750); err != nil {
return err
}
tmp, err := os.CreateTemp(dir, "config-*.toml")
Expand Down
2 changes: 1 addition & 1 deletion styling/styling.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func init() {
}

func HasDarkBackground() bool {
if !term.IsTerminal(int(os.Stdin.Fd())) || !term.IsTerminal(int(os.Stdout.Fd())) {
if !term.IsTerminal(int(os.Stdin.Fd())) || !term.IsTerminal(int(os.Stdout.Fd())) { // #nosec G115
return true
}
return lipgloss.HasDarkBackground(os.Stdin, os.Stdout)
Expand Down
Loading