Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Commit

Permalink
upgrade: start building Secman v3 with new technologies (#162)
Browse files Browse the repository at this point in the history
* start building secman v3

* initialize the modfile of secman, update package.json

* upgrade `secman v2` to `secman core (sc)` to use it with secman

* update `dependabot` config file

* remove workflows and actions

* update `vscode` configs

* create secman code scripts

* add new go modules, create `tools` pkg

* update go modules, create `api` package

* upgrade secman vscode devcontainer

* add new go modules and packages, create `constants` pkg

* start building `ios` pkg to build secman cli iostreams

* create secman iostrams tty_size functions, update modules

* finish from secman iostreams colors functions

* finish from secman iostreams package, add new modules

* start building `cmd` and `internal` packages, update modules

* build the version checker of secman in `internal/checker`

* start building `internal/shared` package, add new go modules

* build the shared style of secman in `internal/shared`

* create secman cli options in `pkg/options` package

* build secman generator in `pkg/generator`, update go modules

* create secman initializer for `secman init` command

* add `abdfnx/gosh` module, create `pkg/info` package

* start building secman commands in `app` pkg, add new modules

* building `pkg/pipe` package with `secman read` pipe

* add secman password type function in `internal/shared`

* create `secman delete` pipe in `pkg/pipe/delete` package

* build `secman insert` command pipe in `pkg/pipe/insert` pkg

* create secman password editor in `pkg/pipe/edit` package

* finish from `secman edit` command pipe in `pkg/pipe/edit` pkg

* start building `secman list` command pipe in `pkg/lister` package

* create secman passwords handlers with bubble list

* finish from `secman list` command pipe view and list functions

* add `secman auth login` command `Login` function

* build `secman auth logout` command functions in `pkg/auth/logout`

* add `secman auth refresh` command functions in `pkg/auth/refresh`

* build `secman auth` command in `app` package

* build `secman edit` command in `app` package

* create `secman delete` command in `app` package

* add `secman insert` command in `app` package

* create `secman read` command in `app` package

* build `secman list` command in `app` package

* start building secman help command handlers

* build secman customize help

* finish from secman root command and add all app commands

* build secman main file

* init secman task file, fix errors, update go modules

* fix errors in `auth` command and options, update `.gitingore`

* setup `golangci` for secman

* configure `goreleaser` for secman to automate releaseing

* docs(README): update secman readme to the next level

* actions(go): build secman go workflow to check go status every commit

* actions(codeql): setup codeql scanning code workflow

* workflows(release): build and finish from secman release workflow

* add `install` task, update codeowners, and contributing guide

* add npm source file

@abdfnx
  • Loading branch information
abdfnx authored Mar 10, 2022
2 parents 1c2fa1b + fed1281 commit 52f8fe2
Show file tree
Hide file tree
Showing 152 changed files with 7,508 additions and 4,455 deletions.
13 changes: 9 additions & 4 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
ARG VARIANT=16-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
ARG VARIANT=1.17
ARG NODE_VERSION="16"

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive
FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT}

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive && apt-get install software-properties-common curl

# Install Node.js
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi

# Install Secman
RUN su node -c "npm install -g secman"
RUN su userx -c "curl -sL https://u.secman.dev | bash"

# Initialize `~/.secman`
RUN secman init
27 changes: 19 additions & 8 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,39 @@
{
"name": "Node.js",
"name": "Go",
"build": {
"dockerfile": "Dockerfile",
"args": { "VARIANT": "16-bullseye" }
},
"dockerfile": "Dockerfile",
"args": {
"VARIANT": "1.17",
"NODE_VERSION": "16"
}
},
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
"settings": {
"search.exclude": {
"node_modules/**": true
},
"go.toolsManagement.checkForUpdates": "local",
"go.useLanguageServer": true,
"go.gopath": "/go",
"go.goroot": "/usr/local/go",
"editor.formatOnSave": true,
"editor.fontLigatures": true,
"git.autofetch": true,
"git.confirmSync": false,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"javascript.updateImportsOnFileMove.enabled": "always"
"javascript.updateImportsOnFileMove.enabled": "always",
"compile-hero.disable-compile-files-on-did-save-code": true
},
"extensions": [
"ms-vscode.js-debug",
"ms-azuretools.vscode-docker",
"esbenp.prettier-vscode",
"PKief.material-icon-theme",
"aaron-bond.better-comments",
"dsznajder.es7-react-js-snippets"
"dsznajder.es7-react-js-snippets",
"golang.go",
"bbenoist.Nix"
],
"postCreateCommand": "yarn install",
"remoteUser": "node"
"postCreateCommand": "go mod tidy && cd core && yarn",
"remoteUser": "userx"
}
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[{*.yml,*.yaml,package.json}]
indent_style = space
indent_size = 2
6 changes: 1 addition & 5 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
* @abdfnx
snapcraft.yaml @david-tomson
.github/workflows/secman.yml @david-tomson
.github/workflows/pack.yml @david-tomson
README.md @Timothee-Cardoso
* @abdfnx @Timothee-Cardoso @david-tomson
8 changes: 5 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ We'd also love to hear about ideas for new features as issues or discussions.

### Prerequisites:

- `npm` version `>= 8.0.0`
- `go` version >= `13`
- `npm` version >= `8.0.0`

### Run

* run **yarn build** to build.
* run **yarn link** to link to secman and test it.
* run **task build** to build secman cli.
* run **task link** to link to secman core cli and test it.
* run **task install** to setup secman and use it.

## Create or submitting a pull request

Expand Down
1 change: 0 additions & 1 deletion .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ currently being supported with security updates.

| Version | Supported |
| ------- | ------------------ |
| v5.0.2+ | :white_check_mark: |
| v2.0.x+ | :white_check_mark: |
| < v1.0.0 | :x: |

Expand Down
8 changes: 7 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/tools/editor"
directory: "/"
schedule:
interval: "daily"
reviewers:
- abdfnx
- package-ecosystem: npm
directory: "/core"
schedule:
interval: "daily"
reviewers:
Expand Down
32 changes: 0 additions & 32 deletions .github/workflows/build-ci.yml

This file was deleted.

12 changes: 9 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
name: CodeQL
name: "CodeQL"

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: "45 10 * * 3"
- cron: "40 8 * * 0"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ "javascript", "go" ]
language: [ "go", "javascript" ]

steps:
- name: Checkout repository
Expand All @@ -27,6 +31,8 @@ jobs:
with:
languages: ${{ matrix.language }}

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

Expand Down
122 changes: 0 additions & 122 deletions .github/workflows/docker.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Go

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: Build
run: |
go run ./scripts/date.go >> date.txt
go build -ldflags "-X main.version=$(git describe --abbrev=0 --tags) -X main.buildDate=$(cat date.txt)" -o tran
- name: Test
run: go test -v ./...
13 changes: 0 additions & 13 deletions .github/workflows/greetings.yml

This file was deleted.

Loading

0 comments on commit 52f8fe2

Please sign in to comment.