Skip to content

Commit 84f7d14

Browse files
authored
Merge branch 'develop' into dependabot/go_modules/github.com/rs/zerolog-1.34.0
2 parents 6191863 + 2492ba1 commit 84f7d14

6 files changed

Lines changed: 125 additions & 25 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
name: CI
2+
permissions:
3+
contents: read
24
on:
35
push:
46
branches: [main, develop]
@@ -7,8 +9,8 @@ jobs:
79
test:
810
runs-on: ubuntu-latest
911
steps:
10-
- uses: actions/checkout@v4
11-
- uses: actions/setup-go@v5
12+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
13+
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff
1214
with:
1315
go-version: '1.24'
1416
- run: go mod tidy

.github/workflows/codeql.yml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,44 @@
11
name: CodeQL
2+
23
on:
34
push:
4-
branches: [main]
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
schedule:
9+
- cron: '25 14 * * 1'
10+
11+
permissions:
12+
contents: read
13+
514
jobs:
615
analyze:
16+
name: Analyze
717
runs-on: ubuntu-latest
18+
timeout-minutes: 360
19+
permissions:
20+
security-events: write
21+
822
steps:
9-
- uses: actions/checkout@v4
23+
- name: Checkout repository
24+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.2.2
25+
26+
- name: Setup Go
27+
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.1.0
28+
with:
29+
go-version: '1.24'
30+
cache: true
31+
1032
- name: Initialize CodeQL
11-
uses: github/codeql-action/init@v3
33+
uses: github/codeql-action/init@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
1234
with:
1335
languages: go
36+
queries: security-extended
37+
38+
- name: Build
39+
run: go build -v ./...
40+
1441
- name: Perform CodeQL Analysis
15-
uses: github/codeql-action/analyze@v3
42+
uses: github/codeql-action/analyze@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
43+
with:
44+
category: "/language:go"

.github/workflows/release.yml

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,44 @@
11
name: Release
2+
23
on:
34
push:
45
tags:
56
- 'v*'
7+
8+
permissions:
9+
contents: read
10+
611
jobs:
712
release:
813
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
916
steps:
10-
- uses: actions/checkout@v4
17+
- name: Checkout
18+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
19+
with:
20+
fetch-depth: 0
21+
1122
- name: Set up Go
12-
uses: actions/setup-go@v5
23+
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff
1324
with:
14-
go-version: '1.21'
15-
- name: Build
16-
run: make build
17-
- name: Publish Release
18-
uses: softprops/action-gh-release@v2
25+
go-version: '1.24'
26+
27+
- name: Run tests
28+
run: go test -v -race ./...
29+
30+
- name: Build binaries
31+
run: |
32+
GOOS=linux GOARCH=amd64 go build -ldflags "-X main.version=${{ github.ref_name }}" -o bin/sereni-storage-provider-linux-amd64 ./cmd/server
33+
GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.version=${{ github.ref_name }}" -o bin/sereni-storage-provider-darwin-amd64 ./cmd/server
34+
GOOS=darwin GOARCH=arm64 go build -ldflags "-X main.version=${{ github.ref_name }}" -o bin/sereni-storage-provider-darwin-arm64 ./cmd/server
35+
GOOS=windows GOARCH=amd64 go build -ldflags "-X main.version=${{ github.ref_name }}" -o bin/sereni-storage-provider-windows-amd64.exe ./cmd/server
36+
37+
- name: Create Release
38+
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe
1939
with:
20-
files: build/*
40+
generate_release_notes: true
41+
files: |
42+
bin/sereni-storage-provider-*
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/scorecard.yml

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,53 @@
1-
name: OpenSSF Scorecard
1+
name: Scorecard
2+
23
on:
4+
branch_protection_rule:
5+
schedule:
6+
- cron: '0 6 * * 1'
37
push:
4-
branches: [main]
8+
branches: [main, develop]
9+
10+
permissions:
11+
contents: read
12+
513
jobs:
614
analysis:
15+
name: Scorecard analysis
716
runs-on: ubuntu-latest
17+
permissions:
18+
security-events: write
19+
820
steps:
9-
- uses: actions/checkout@v4
10-
- uses: ossf/scorecard-action@v2
21+
- name: Checkout
22+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
23+
with:
24+
persist-credentials: false
25+
26+
- name: Run Scorecard
27+
uses: ossf/scorecard-action@ff5dd8929f96a8a4dc67d13f32b8c75057829621
28+
with:
29+
results_file: results.sarif
30+
results_format: sarif
31+
publish_results: false
32+
33+
- name: Filter out CII-Best-Practices from SARIF
34+
run: |
35+
if ! command -v jq >/dev/null; then
36+
sudo apt-get update && sudo apt-get install -y jq
37+
fi
38+
# Remove results whose ruleId is CII-Best-Practices
39+
jq '(.runs[] .results) |= [ .[] | select(.ruleId != "CII-Best-Practices") ]' results.sarif > filtered.sarif || true
40+
mv filtered.sarif results.sarif
41+
42+
- name: Upload artifact
43+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
44+
with:
45+
name: SARIF file
46+
path: results.sarif
47+
retention-days: 5
48+
49+
- name: Upload to code-scanning
50+
uses: github/codeql-action/upload-sarif@3b1a19a80ab047f35cbb237b5bd9bdc1e14f166c
51+
with:
52+
sarif_file: results.sarif
53+

Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
# Build stage
2-
FROM golang:1.24.4-alpine AS builder
2+
FROM golang:1.24.4-alpine@sha256:68932fa6d4d4059845c8f40ad7e654e626f3ebd3706eef7846f319293ab5cb7a AS builder
33

44
WORKDIR /app
55

66
# Install required packages
77
RUN apk add --no-cache git ca-certificates
88

9-
# Install swag CLI for swagger docs generation
10-
RUN go install github.com/swaggo/swag/cmd/swag@latest
9+
# Install swag CLI for swagger docs generation (pinned to v1.16.4 - commit 0b9e347c196710ea155a147782bf51707a600c2c)
10+
RUN git clone https://github.com/swaggo/swag.git /tmp/swag && \
11+
cd /tmp/swag && \
12+
git checkout 0b9e347c196710ea155a147782bf51707a600c2c && \
13+
go install ./cmd/swag && \
14+
rm -rf /tmp/swag
1115

1216
# Copy go mod files
1317
COPY go.mod go.sum ./
@@ -22,7 +26,7 @@ COPY . .
2226
RUN swag init -g cmd/server/main.go -o docs && go mod tidy && CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main ./cmd/server
2327

2428
# Final stage
25-
FROM alpine:3.20
29+
FROM alpine:3.20@sha256:a4f4213abb84c497377b8544c81b3564f313746700372ec4fe84653e4fb03805
2630

2731
WORKDIR /app
2832

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# sereni-storage-provider - Cloud-Native Object Storage Service
2-
32
> Enterprise-grade object storage service and open source storage service with S3-compatible APIs. A comprehensive file storage API and cloud storage backend providing advanced access control, multi-tenant architecture, and seamless integration with modern cloud infrastructure.
43
5-
64
[![Version](https://img.shields.io/badge/Version-1.0.0-blue.svg)](LICENSE)
75
[![Go Version](https://img.shields.io/badge/Go-1.23+-00ADD8?style=flat-square&logo=go)](https://golang.org)
86
[![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
@@ -45,7 +43,7 @@ We welcome contributions! Please:
4543

4644
## Overview
4745

48-
**sereni-storage-provider** is an enterprise-grade storage backend service and developer storage API engineered for scalability, security, and performance. This comprehensive file storage server and backend file management system features S3-compatible APIs, advanced access control mechanisms, multi-tenant architecture, and seamless integration with modern cloud-native infrastructure, providing backend storage service capabilities, open source file storage for teams, and acting as a storage provider backend for cloud-native apps. Complete storage integration service for file upload applications.
46+
**Sereni Storage Provider** is an open-source, enterprise-grade storage platform that provides S3-compatible storage, MinIO support, and local file system integration. Built for scalability and flexibility, it enables developers to manage and store data securely across cloud-native and on-premise infrastructures. With API compatibility, robust access control mechanisms, and a scalable backend architecture, Sereni simplifies storage management for modern, distributed applications.
4947

5048
## Key Features
5149

0 commit comments

Comments
 (0)