Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
80d9255
fix: update to latest go for security fix (#59)
dnitsch Dec 5, 2025
a8357f7
build(deps): bump the low-risk group across 1 directory with 6 updates
dependabot[bot] Feb 2, 2026
55f0199
Merge pull request #62 from DevLabFoundry/dependabot/go_modules/low-r…
ElvenSpellmaker Feb 2, 2026
b5f90a6
build(deps): bump github.com/googleapis/gax-go/v2 in the low-risk group
dependabot[bot] Feb 9, 2026
aff4d50
Merge pull request #63 from DevLabFoundry/dependabot/go_modules/low-r…
ElvenSpellmaker Feb 9, 2026
c2faa6c
build(deps): bump the low-risk group with 2 updates
dependabot[bot] Feb 23, 2026
f72efde
Merge pull request #64 from DevLabFoundry/dependabot/go_modules/low-r…
ElvenSpellmaker Feb 23, 2026
270bd97
build(deps): bump the low-risk group with 4 updates
dependabot[bot] Mar 2, 2026
8987be0
Merge pull request #65 from DevLabFoundry/dependabot/go_modules/low-r…
ElvenSpellmaker Mar 2, 2026
845c786
build(deps): bump the low-risk group with 4 updates
dependabot[bot] Mar 9, 2026
281bfcb
Merge pull request #66 from DevLabFoundry/dependabot/go_modules/low-r…
ElvenSpellmaker Mar 9, 2026
5f10eae
fix: sonar move org
ElvenSpellmaker Mar 13, 2026
29d8942
fix: moves sonar org to devlabfoundry
ElvenSpellmaker Mar 13, 2026
475806c
Merge branch 'master' of github.com:DevLabFoundry/configmanager into …
ElvenSpellmaker Mar 13, 2026
96737fe
fix: update readme
ElvenSpellmaker Mar 13, 2026
67290e5
Merge pull request #67 from DevLabFoundry/fix/sonar-org-move
ElvenSpellmaker Mar 13, 2026
d1758cd
build(deps): bump the low-risk group with 5 updates
dependabot[bot] Mar 16, 2026
2931271
Merge pull request #68 from DevLabFoundry/dependabot/go_modules/low-r…
ElvenSpellmaker Mar 16, 2026
570a5d6
fix: vuln CVE-2026-33186
dnitsch Mar 19, 2026
86db2e4
Merge pull request #69 from DevLabFoundry/fix/CVE-2026-33186
ElvenSpellmaker Mar 19, 2026
48c11e1
build(deps): bump the low-risk group with 7 updates
dependabot[bot] Mar 29, 2026
868fdef
Merge pull request #71 from DevLabFoundry/dependabot/go_modules/low-r…
ElvenSpellmaker Mar 30, 2026
25b2921
build(deps): bump github.com/go-jose/go-jose/v4 from 4.1.3 to 4.1.4
dependabot[bot] Apr 3, 2026
9b5e56b
Merge pull request #73 from DevLabFoundry/dependabot/go_modules/githu…
ElvenSpellmaker Apr 3, 2026
f116599
build(deps): bump the low-risk group with 3 updates
dependabot[bot] Apr 5, 2026
c047151
Merge pull request #74 from DevLabFoundry/dependabot/go_modules/low-r…
ElvenSpellmaker Apr 6, 2026
4a7f8ef
build(deps): bump cloud.google.com/go/secretmanager
dependabot[bot] Apr 12, 2026
75feb40
Merge pull request #75 from DevLabFoundry/dependabot/go_modules/low-r…
ElvenSpellmaker Apr 13, 2026
e06c980
build(deps): bump the low-risk group with 7 updates
dependabot[bot] Apr 19, 2026
2987368
Merge pull request #76 from DevLabFoundry/dependabot/go_modules/low-r…
ElvenSpellmaker Apr 20, 2026
7330ac9
build(deps): bump the low-risk group with 5 updates
dependabot[bot] May 3, 2026
f8f15f8
Merge pull request #77 from DevLabFoundry/dependabot/go_modules/low-r…
ElvenSpellmaker May 4, 2026
75825d2
fix: bumps to go 1.26
ElvenSpellmaker May 11, 2026
4c31e5a
Merge pull request #78 from DevLabFoundry/fix/cves-bump-1-26
ElvenSpellmaker May 11, 2026
8a03fe8
feat: implement strict flag
ElvenSpellmaker May 21, 2026
25a4de1
Merge pull request #79 from DevLabFoundry/feat/strict-mode-v2
ElvenSpellmaker May 22, 2026
fedf0bb
feat: fixes committed run on master
ElvenSpellmaker May 22, 2026
dfebc0f
Merge pull request #80 from DevLabFoundry/fix/committed
ElvenSpellmaker May 22, 2026
57483dc
build(deps): bump github.com/aws/aws-sdk-go-v2/config
dependabot[bot] May 24, 2026
8367faf
Merge pull request #81 from DevLabFoundry/dependabot/go_modules/low-r…
ElvenSpellmaker May 25, 2026
b65f087
build(deps): bump the low-risk group with 5 updates
dependabot[bot] May 31, 2026
4f6ac50
fix: allow all line lengths on committed
ElvenSpellmaker Jun 1, 2026
5b82b68
Merge pull request #82 from DevLabFoundry/dependabot/go_modules/low-r…
ElvenSpellmaker Jun 1, 2026
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
Empty file added .eirctl/.gitkeep
Empty file.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* text eol=lf
*.jpg binary
*.jpeg binary
*.png binary
*.gif binary
17 changes: 12 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ permissions:

jobs:
set-version:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
container:
image: mcr.microsoft.com/dotnet/sdk:6.0
image: mcr.microsoft.com/dotnet/sdk:10.0
outputs:
semVer: ${{ steps.gitversion.outputs.semVer }}
steps:
Expand All @@ -29,10 +29,12 @@ jobs:
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config user.email ${{ github.actor }}-ci@gha.org
git config user.name ${{ github.actor }}

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v3.0.0
with:
versionSpec: "5.x"

- name: Set SemVer Version
uses: gittools/actions/gitversion/execute@v3.0.0
id: gitversion
Expand All @@ -43,7 +45,7 @@ jobs:
echo "VERSION -> $GITVERSION_SEMVER"

test:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: set-version
env:
SEMVER: ${{ needs.set-version.outputs.semVer }}
Expand All @@ -52,17 +54,22 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
fetch-depth: 0

- name: Install Eirctl
uses: ensono/actions/eirctl-setup@v0.3.1
with:
version: 0.9.3
version: 0.11.2
isPrerelease: false

- name: Run Commit Lint
run: |
eirctl commit-lint

- name: Run Lint
run: |
eirctl run pipeline lints

- name: Run Tests
run: |
eirctl run pipeline gha:unit:test
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ permissions:

jobs:
set-version:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
if: ${{ github.event.workflow_run.head_branch == 'master' && github.event.workflow_run.conclusion == 'success' }}
container:
image: mcr.microsoft.com/dotnet/sdk:6.0
image: mcr.microsoft.com/dotnet/sdk:10.0
outputs:
semVer: ${{ steps.gitversion.outputs.semVer }}
steps:
Expand All @@ -39,7 +39,7 @@ jobs:
id: gitversion

release:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: set-version
env:
SEMVER: ${{ needs.set-version.outputs.semVer }}
Expand All @@ -50,7 +50,7 @@ jobs:

- name: Install Eirctl
uses: ensono/actions/eirctl-setup@v0.3.1
with:
with:
version: 0.7.6
isPrerelease: false

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release_container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ on:
workflows: ['Lint and Test']
types:
- completed
branches:
branches:
- main

permissions:
contents: write
packages: write
packages: write

jobs:
set-version-tag:
Expand All @@ -33,7 +33,7 @@ jobs:
id: gitversion

build-and-push:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: set-version-tag
env:
SEMVER: ${{ needs.set-version-tag.outputs.semVer }}
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ dist

# local testers and
local/

# Eirctl
eirctl.env
.eirctl/*
!.eirctl/.gitkeep
9 changes: 9 additions & 0 deletions GitVersion.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Conventional Commits versioning rules:
# Major: any type with ! (e.g. feat!:, fix(scope)!:) or BREAKING CHANGE in commit footer
# Minor: feat: or feat(scope):
# Patch: all other types (fix:, refactor:, debug:, chore:, etc.)
mode: Mainline
commit-message-incrementing: Enabled
major-version-bump-message: '^(\w+)(\(\w+\))?!:|BREAKING CHANGE'
minor-version-bump-message: '^feat(\(\w+\))?:'
patch-version-bump-message: '^(\w+)(\(\w+\))?:'
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

[![Go Reference](https://pkg.go.dev/badge/github.com/DevLabFoundry/configmanager/v2.svg)](https://pkg.go.dev/github.com/DevLabFoundry/configmanager/v2)
[![Go Report Card](https://goreportcard.com/badge/github.com/DevLabFoundry/configmanager/v2)](https://goreportcard.com/report/github.com/DevLabFoundry/configmanager/v2)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=dnitsch_configmanager&metric=bugs)](https://sonarcloud.io/summary/new_code?id=dnitsch_configmanager)
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=dnitsch_configmanager&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=dnitsch_configmanager)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=dnitsch_configmanager&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=dnitsch_configmanager)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=dnitsch_configmanager&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=dnitsch_configmanager)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=dnitsch_configmanager&metric=coverage)](https://sonarcloud.io/summary/new_code?id=dnitsch_configmanager)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=DevLabFoundry_configmanager&metric=bugs)](https://sonarcloud.io/summary/new_code?id=DevLabFoundry_configmanager)
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=DevLabFoundry_configmanager&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=DevLabFoundry_configmanager)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=DevLabFoundry_configmanager&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=DevLabFoundry_configmanager)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=DevLabFoundry_configmanager&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=DevLabFoundry_configmanager)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=DevLabFoundry_configmanager&metric=coverage)](https://sonarcloud.io/summary/new_code?id=DevLabFoundry_configmanager)

Package used for retrieving application settings from various sources.

Expand Down
9 changes: 6 additions & 3 deletions cmd/configmanager/configmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ var (

type rootCmdFlags struct {
verbose bool
strict bool
tokenSeparator string
keySeparator string
enableEnvSubst bool
Expand All @@ -38,14 +39,16 @@ func NewRootCmd(logger log.ILogger) *Root { //channelOut, channelErr io.Writer
Short: fmt.Sprintf("%s CLI for retrieving and inserting config or secret variables", config.SELF_NAME),
Long: fmt.Sprintf(`%s CLI for retrieving config or secret variables.
Using a specific tokens as an array item`, config.SELF_NAME),
SilenceUsage: true,
Version: fmt.Sprintf("%s-%s", Version, Revision),
SilenceUsage: true,
SilenceErrors: true,
Version: fmt.Sprintf("%s-%s", Version, Revision),
},
logger: logger,
rootFlags: &rootCmdFlags{},
}

rc.Cmd.PersistentFlags().BoolVarP(&rc.rootFlags.verbose, "verbose", "v", false, "Verbosity level")
rc.Cmd.PersistentFlags().BoolVar(&rc.rootFlags.strict, "strict", false, "Exit with a non-zero exit code if any provider fails")
rc.Cmd.PersistentFlags().StringVarP(&rc.rootFlags.tokenSeparator, "token-separator", "s", "#", "Separator to use to mark concrete store and the key within it")
rc.Cmd.PersistentFlags().StringVarP(&rc.rootFlags.keySeparator, "key-separator", "k", "|", "Separator to use to mark a key look up in a map. e.g. AWSSECRETS#/token/map|key1")
rc.Cmd.PersistentFlags().BoolVarP(&rc.rootFlags.enableEnvSubst, "enable-envsubst", "e", false, "Enable envsubst on input. This will fail on any unset or empty variables")
Expand All @@ -72,7 +75,7 @@ func cmdutilsInit(rootCmd *Root, cmd *cobra.Command, path string) (*cmdutils.Cmd
}

cm := configmanager.New(cmd.Context())
cm.Config.WithTokenSeparator(rootCmd.rootFlags.tokenSeparator).WithOutputPath(path).WithKeySeparator(rootCmd.rootFlags.keySeparator).WithEnvSubst(rootCmd.rootFlags.enableEnvSubst)
cm.Config.WithTokenSeparator(rootCmd.rootFlags.tokenSeparator).WithOutputPath(path).WithKeySeparator(rootCmd.rootFlags.keySeparator).WithEnvSubst(rootCmd.rootFlags.enableEnvSubst).WithStrict(rootCmd.rootFlags.strict)
gnrtr := generator.NewGenerator(cmd.Context(), func(gv *generator.GenVars) {
if rootCmd.rootFlags.verbose {
rootCmd.logger.SetLevel(log.DebugLvl)
Expand Down
12 changes: 10 additions & 2 deletions cmd/configmanager/fromfileinput.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"fmt"
"os"

"github.com/DevLabFoundry/configmanager/v2/internal/cmdutils"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -30,9 +31,16 @@ func newFromStrCmd(rootCmd *Root) {
if err != nil {
return err
}
defer outputWriter.Close()

return cu.GenerateStrOut(inputReader, f.input == f.path)
err = cu.GenerateStrOut(inputReader, f.input == f.path)
outputWriter.Close()
if err != nil {
if rootCmd.rootFlags.strict && f.path != "stdout" {
os.Remove(f.path)
}
return err
}
return nil
},
PreRunE: func(cmd *cobra.Command, args []string) error {
if len(f.input) < 1 {
Expand Down
4 changes: 4 additions & 0 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@ package main

import (
"context"
"fmt"
"os"

cfgmgr "github.com/DevLabFoundry/configmanager/v2/cmd/configmanager"
"github.com/DevLabFoundry/configmanager/v2/internal/log"
)

const redTerminal = "\x1b[31m%s\x1b[0m"

func main() {
logger := log.New(os.Stderr)
cmd := cfgmgr.NewRootCmd(logger)
if err := cmd.Execute(context.Background()); err != nil {
fmt.Fprintf(os.Stderr, redTerminal+"\n", err)
os.Exit(1)
}
}
12 changes: 12 additions & 0 deletions committed.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# committed.toml
# Enforces Conventional Commits format: type(scope)?!?: subject
# Versioning impact (configured in GitVersion.yaml):
# Major: any type with ! suffix (e.g. feat!:, fix(scope)!:) or BREAKING CHANGE in footer
# Minor: feat: or feat(scope):
# Patch: all other types (fix:, refactor:, debug:, chore:, etc.)

style = "conventional"
subject_capitalized = false
imperative_subject = false
allowed_types = []
line_length = 0
39 changes: 33 additions & 6 deletions eirctl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,25 @@ output: prefixed
debug: false

import:
- https://raw.githubusercontent.com/Ensono/eirctl/refs/tags/0.9.3/shared/build/go/eirctl.yaml
- https://raw.githubusercontent.com/Ensono/eirctl/refs/tags/0.10.0/shared/build/go/eirctl.yaml

contexts:
bash:
container:
name: mirror.gcr.io/bash:5.0.18-alpine3.22

committed:
container:
name: alpine:3
shell: /bin/sh
shell_args: ["-c"]

pipelines:
commit-lint:
- task: lint:commits

gha:unit:test:
- pipeline: test:unit
- pipeline: test:unit
env:
ROOT_PKG_NAME: github.com/DevLabFoundry
- task: sonar:coverage:prep
Expand All @@ -30,6 +39,27 @@ pipelines:
depends_on: clean

tasks:
lint:commits:
context: committed
description: Lint commit messages against Conventional Commits using committed
command:
- |
COMMITTED_VERSION="v1.1.11"
apk add --no-cache git
git config --global safe.directory '*'
if [ ! -f /eirctl/.eirctl/committed ]; then
echo "Downloading committed binary..."
wget -qO- https://github.com/crate-ci/committed/releases/download/${COMMITTED_VERSION}/committed-${COMMITTED_VERSION}-x86_64-unknown-linux-musl.tar.gz \
| tar xz -C /tmp
install -m 755 /tmp/committed /eirctl/.eirctl/committed
fi
if [ -n "$GITHUB_BASE_REF" ]; then
RANGE="HEAD^1..HEAD^2"
/eirctl/.eirctl/committed $RANGE --no-merge-commit
else
echo "SKIPPING FOR NOW ON NON-PRs"
fi

show:coverage:
description: Opens the current coverage viewer for the the configmanager utility.
command: go tool cover -html=.coverage/out
Expand All @@ -39,7 +69,6 @@ tasks:
Opens a webview with godoc running
Already filters the packages to this one and enables
internal/private package documentation
# go install golang.org/x/tools/cmd/godoc@latest
command: |
open http://localhost:6060/pkg/github.com/DevLabFoundry/configmanager/v2/?m=all
godoc -notes "BUG|TODO" -play -http=:6060
Expand Down Expand Up @@ -90,7 +119,7 @@ tasks:
sonar:coverage:prep:
context: bash
command:
- |
- |
sed -i 's|github.com/DevLabFoundry/configmanager/v2/||g' .coverage/out
echo "Coverage file first 20 lines after conversion:"
head -20 .coverage/out
Expand All @@ -108,5 +137,3 @@ tasks:
env:
- VERSION
- REVISION


Loading
Loading