Skip to content

Commit

Permalink
Setup Release Management (#28)
Browse files Browse the repository at this point in the history
* Initial commit

* Run unit tests in CI

* Change workflow file name

* Run lint and build in CI

* Rename workflow file to build

* Load configuration from ENV variables using dotenv

* Add a note about .env file in the readme

* Fix production build not loading configuration properly

* Update README.md

Update .env variable info

* Fix jest and cypress types collision

* Fix typo in readme

* Dockerfile + docker-compose + Github Actions (#8)

* Dockerfile init

* Multistage

* dev version

* Copy node_modules

* Working docker-compose v0

* github job perms

* Docker-compose for different purposes

* Deploy Beta

---------

Co-authored-by: Nicolas Vuillamy <[email protected]>

* Display megalinter errors to the user

* Remove unused code

* Move form loader to the button

* Add file upload loader

* Fix file upload form transition

* Fix highlight in light mode

* Adding language detection for snippet code

* Add back to homepage button

* Add file uploader unit tests

* Breakdown language-detection

* Simplify use of language detection

* Move reolve icon

* Rename name map file

* Move resolveId and test

* Unit test language detection

* toBeUndefined();

* Small UI fixes

* Export issues to CSV

* Online documentation for GitHub Pages (#17)

* Doc v0

* Change npm i to npm ci

* v0.1

* More doc :)

* links to ML & OX

* fix doc

---------

Co-authored-by: Nicolas Vuillamy <[email protected]>
Co-authored-by: itayox <[email protected]>

* MegaLinter setup (#18)

* MegaLinter setup

* Fixes

* Disable pre-commit handled linters

* Use Cupcake flavor

* config

* Fixes

* cspell + semver upgrade

* Config

* Upgrade ML to 7.2.1

* lycheeignore

* disable kics & csslint + config trivy

* checkov + jscpd

* Disable temporary some linters

---------

Co-authored-by: Nicolas Vuillamy <[email protected]>

* Fix jscpd config (#19)

Co-authored-by: Nicolas Vuillamy <[email protected]>

* HTTP server breakdown

* Fix typescript error

* Docs + CNAME

* Previous version display

* Add retry mechanism

* Update debugging information

* Enable re-scanning

* Remove text transform

* Migrate turbo-repo

* Fix switching between reports

* Fix button not clickable

* Reset report store on init

* Replace Megalinter with MegaLinter label (#24)

* Replace Megalinter with MegaLinter label

* Inline disable devskim false positive

---------

Co-authored-by: Nicolas Vuillamy <[email protected]>

* Fix footer text

* Move api routes under /api and serve index.html for all GET requests

* http unit tests

* Add the test file

* Add static folder path to unit test

* Release management

* Move parseSBOM

* Fix unit test

* Increase resource value text limit to 600px

* Images versions + README

* cspell

* Aply ML fixes

* Quick Start

* SBOM for python

* SBOM for python

* SBOM for python #2

* Update contributing examples with iconPngUrl

* Use megalinter api beta

* [MegaLinter] Apply linters fixes

---------

Co-authored-by: Itay <[email protected]>
Co-authored-by: itayox <[email protected]>
Co-authored-by: Nicolas Vuillamy <[email protected]>
Co-authored-by: eyalatox <[email protected]>
Co-authored-by: Eyal Paz <[email protected]>
Co-authored-by: nvuillam <[email protected]>
  • Loading branch information
7 people authored Aug 7, 2023
1 parent f0826a0 commit d1657d7
Show file tree
Hide file tree
Showing 190 changed files with 23,811 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.github
docs
redis
server-files
16 changes: 16 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# MEGALINTER
MEGALINTER_ANALYSIS_URL=http://127.0.0.1:8000/analysis
MEGALINTER_UPLOAD_URL=http://127.0.0.1:8000/upload-file
MEGALINTER_REDIS_URL=redis://127.0.0.1:6379
MEGALINTER_REDIS_CHANNEL=megalinter:pubsub:<request-id>

# BACKEND
CODETOTAL_HTTP_PORT=8081
CODETOTAL_HTTP_HOST=127.0.0.1
CODETOTAL_WS_PORT=8080
CODETOTAL_WS_HOST=127.0.0.1
DEBUG_MODULES=actions,megalinter,stores,transport

# FRONTEND
CODETOTAL_UPLOAD_FILE_LIMIT_BYTES=10000000

14 changes: 14 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': 'warn',
},
}
6 changes: 6 additions & 0 deletions .github/linters/.checkov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# You can see all available properties here: https://github.com/bridgecrewio/checkov#configuration-using-a-config-file
quiet: true
skip-check:
- CKV_DOCKER_2
- CKV_DOCKER_3
- CKV2_GHA_1
246 changes: 246 additions & 0 deletions .github/linters/.cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,246 @@
{
"ignorePaths": [
"**/node_modules/**",
"**/vscode-extension/**",
"**/.git/**",
"**/.pnpm-lock.json",
".vscode",
"megalinter",
"package-lock.json",
"report"
],
"language": "en",
"noConfigSearch": true,
"version": "0.2",
"words": [
"ABAP",
"ABNF",
"Bisoni",
"Brainfuck",
"Buildx",
"CODETOTAL",
"Cpcdos",
"Crmsh",
"Cypher",
"DEVSKIM",
"DJLINT",
"DUSTILOCK",
"Dafny",
"EBNF",
"Eyal",
"Flix",
"GITLEAKS",
"GSQL",
"Golo",
"HTMLHINT",
"Haml",
"Haxe",
"IRPF",
"Itay",
"Jolie",
"KICS",
"LDIF",
"Laravel",
"MLIR",
"Mathematica",
"Mojolicious",
"Moonscript",
"Motoko",
"NSIS",
"Oxygene",
"Proto",
"ROOTPATH",
"Rebol",
"Roboconf",
"SARIF",
"SEMGREP",
"SHELLCHECK",
"SHFMT",
"SYFT",
"Sarif",
"Satoshi",
"Scilab",
"Smali",
"Stata",
"TRIVY",
"TRUFFLEHOG",
"Toit",
"Trivy",
"VHDL",
"Vala",
"Verilog",
"Vuillamy",
"Zephir",
"abap",
"abnf",
"accesslog",
"actionscript",
"adoc",
"afpmcmb",
"angelscript",
"apacheconf",
"applescript",
"armasm",
"aspectj",
"autofix",
"autohotkey",
"autoit",
"avrasm",
"axapta",
"bbcode",
"bgcolor",
"brainfuck",
"buildx",
"bvyv",
"capnp",
"capnproto",
"cbdd",
"cffi",
"chpl",
"cmdline",
"codetotal",
"colorama",
"countup",
"craftcms",
"crmsh",
"cypher",
"dafny",
"dateutil",
"devicon",
"devskim",
"dsconfig",
"dustilock",
"ebnf",
"extrahead",
"filesize",
"flix",
"fontawesome",
"gcode",
"gdscript",
"gitleaks",
"glightbox",
"glsl",
"golo",
"gololang",
"grype",
"gsql",
"gtag",
"hadolint",
"haml",
"haxe",
"hlsl",
"htmlbars",
"hylang",
"iecst",
"irpf",
"itsdangerous",
"javascripts",
"jolie",
"kaos",
"kics",
"kubeconform",
"kubescape",
"languagedetection",
"lassoscript",
"ldif",
"livecodeserver",
"livescript",
"lookml",
"lycheeignore",
"markupsafe",
"materialx",
"mathematica",
"mawk",
"megalinter",
"mipsasm",
"mirc",
"mkdocs",
"mkdown",
"mlir",
"mojolicious",
"moonscript",
"motoko",
"nawk",
"nginxconf",
"njsproj",
"nodenext",
"nsis",
"ntvs",
"numpy",
"nvuillam",
"objc",
"opencontainers",
"openscad",
"osascript",
"oxsecurity",
"oxygene",
"paramiko",
"pcmk",
"pgsql",
"pinescript",
"podspec",
"postbuild",
"precodetotal",
"prestart",
"proto",
"protobuf",
"pycon",
"pycparser",
"pymdown",
"pymdownx",
"pynacl",
"pytz",
"pyyaml",
"qsharp",
"quickfixes",
"rapidfuzz",
"reasonml",
"rebol",
"redbol",
"riscript",
"ruleslanguage",
"sarif",
"scilab",
"sdfsdfsdf",
"semgrep",
"shellcheck",
"shexc",
"shfmt",
"smali",
"specfile",
"ssdeep",
"stanfuncs",
"stata",
"stefanzweifel",
"styl",
"stylelint",
"syft",
"terragrunt",
"terrascan",
"tflint",
"toit",
"trivy",
"trivyignore",
"trufflehog",
"tsbuildinfo",
"tsql",
"twemoji",
"typia",
"tzdata",
"uvicorn",
"vala",
"vbnet",
"vbscript",
"venv",
"verilog",
"vhdl",
"vuln",
"werkzeug",
"xquery",
"xsharp",
"xtlang",
"zenscript",
"zephir",
"zustand"
]
}
21 changes: 21 additions & 0 deletions .github/linters/.gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

title = "gitleaks config"

[extend]
# useDefault will extend the base configuration with the default gitleaks config:
# https://github.com/zricethezav/gitleaks/blob/master/config/gitleaks.toml
useDefault = true

[allowlist]
description = "Allowlisted files"
paths = [
'''.automation/test''',
'''megalinter-reports''',
'''.github/linters''',
'''node_modules''',
'''.mypy_cache''',
'''(.*?)gitleaks\.toml$''',
'''(snippets-mocks.ts|language-resolve-id.test.ts|language-detector.ts|submit-snippet.ts)$''',
'''(.*?)(png|jpg|gif|doc|docx|pdf|bin|xls|pyc|zip)$''',
'''(go.mod|go.sum)$''']

24 changes: 24 additions & 0 deletions .github/linters/.jscpd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"threshold": 0,
"reporters": ["html", "markdown"],
"ignore": [
"**/node_modules/**",
"**/.git/**",
"**/.rbenv/**",
"**/.venv/**",
"**/*cache*/**",
"**/.automation/**",
"**/.github/**",
"**/.idea/**",
"**/docs/**",
"**/*.yml",
"**/CHANGELOG.md",
"**/licenses/*.md",
"**/docker-compose-megalinter.yml",
"**/docker-compose-local.yml",
"**/docker-compose.yml",
"**/AppThemeProvider.tsx",
"**/parse-linter-status.test.ts",
"**/parse-megalinter-complete.test.ts"
]
}
31 changes: 31 additions & 0 deletions .github/workflows/build-deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "DOC - Build and deploy - main"
on:
push:
branches:
- main
- docs
paths:
- "docs/**"

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
if: github.repository == 'oxsecurity/codetotal'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/[email protected]
with:
python-version: 3.10.4
- run: pip install --upgrade markdown==3.3.7 mkdocs-material pymdown-extensions==9.11 mkdocs-glightbox==0.3.2 mdx_truly_sane_lists
- run: |
git config --global user.name megalinter-bot
git config --global user.email [email protected]
- run: mkdocs gh-deploy --force
Loading

0 comments on commit d1657d7

Please sign in to comment.