Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
f604dbc
devcontainer
KingBain Jun 4, 2025
bf6c517
nnn
KingBain Jun 4, 2025
50dd39c
updated
KingBain Jun 4, 2025
a82d4a2
updated dev container
KingBain Jun 4, 2025
b987dc7
updated
KingBain Jun 4, 2025
bc0a133
shfmt
KingBain Jun 4, 2025
ca97d37
linting
KingBain Jun 4, 2025
70093ff
formatting
KingBain Jun 4, 2025
7d38820
test
KingBain Jun 4, 2025
5652439
table
KingBain Jun 4, 2025
639c2c1
formatting
KingBain Jun 4, 2025
12a118c
test
KingBain Jun 4, 2025
db61888
sdafasdf
KingBain Jun 4, 2025
a462edf
sdfasd
KingBain Jun 4, 2025
5a614bd
formatting
KingBain Jun 4, 2025
295bbd5
test
KingBain Jun 4, 2025
c8337f7
readme Linting
KingBain Jun 4, 2025
c502713
updated
KingBain Jun 4, 2025
3ef124e
fixed prettier
KingBain Jun 4, 2025
3579dc0
linting
KingBain Jun 4, 2025
ca30ddd
formatting
KingBain Jun 4, 2025
57f698e
test
KingBain Jun 4, 2025
8cfdac0
devcontainer linting
KingBain Jun 4, 2025
0466870
linting
KingBain Jun 4, 2025
b7c22ad
devcontainer linting
KingBain Jun 4, 2025
cb56a48
updated
KingBain Jun 4, 2025
20ef8b0
test
KingBain Jun 4, 2025
ab7351c
textlint
KingBain Jun 4, 2025
2425759
file location
KingBain Jun 4, 2025
2cb3358
formatting
KingBain Jun 4, 2025
edcdc80
test
KingBain Jun 4, 2025
c5a1d54
ASDFa
KingBain Jun 4, 2025
d74c1ef
try again
KingBain Jun 4, 2025
825e326
test
KingBain Jun 4, 2025
a3761f7
test
KingBain Jun 4, 2025
a64dc99
jjkkjk
KingBain Jun 4, 2025
3699cb8
more
KingBain Jun 4, 2025
d476126
dddd
KingBain Jun 4, 2025
5b4b881
exclude
KingBain Jun 4, 2025
c79c172
updated linter
KingBain Jun 4, 2025
a42b1ef
test
KingBain Jun 4, 2025
eb6c266
test
KingBain Jun 4, 2025
14f5a4e
dfgsdf
KingBain Jun 4, 2025
11325d9
adsfsad
KingBain Jun 4, 2025
81e680e
asdfasdf
KingBain Jun 4, 2025
9eecf72
sdASD
KingBain Jun 4, 2025
e1174bb
Merge branch 'main' into devly-linting
KingBain Jun 4, 2025
430dc10
entire repo
KingBain Jun 4, 2025
9bfe5f9
linting
KingBain Jun 4, 2025
32ee19c
rename
KingBain Jun 4, 2025
3a12a28
asdf
KingBain Jun 4, 2025
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
23 changes: 23 additions & 0 deletions .devcontainer/docker-env/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "JF cli, docker, linting",
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/devcontainers-extra/features/jfrog-cli:1": {
"version": "latest"
},
"ghcr.io/devcontainers-community/npm-features/prettier:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"moby": true,
"azureDnsAutoDetection": true,
"installDockerBuildx": true,
"installDockerComposeSwitch": true,
"version": "latest",
"dockerDashComposeVersion": "v2"
},
"ghcr.io/devcontainers-extra/features/shfmt:1": {
"version": "latest"
}
}
}
18 changes: 18 additions & 0 deletions .devcontainer/go-env/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "JF cli, Go, linting",
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/devcontainers-extra/features/jfrog-cli:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/go:1": {
"version": "latest"
},
"ghcr.io/devcontainers-community/npm-features/prettier:1": {
"version": "latest"
},
"ghcr.io/devcontainers-extra/features/shfmt:1": {
"version": "latest"
}
}
}
22 changes: 11 additions & 11 deletions .frogbot-config.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Directories should be scanned for vulnerabilities
projects:
- workingDirectory: "examples/java-app"
tool: "gradle"
- workingDirectory: "examples/python-app"
tool: "pip"
- workingDirectory: "examples/node-app"
tool: "npm"
- workingDirectory: 'examples/java-app'
tool: 'gradle'
- workingDirectory: 'examples/python-app'
tool: 'pip'
- workingDirectory: 'examples/node-app'
tool: 'npm'

# Exclude root directory scanning since it's not an application
excludeDirectories:
- "scripts/"
- "stats/"
- "venvdir/"
- ".github/"
- "docs/"
- 'scripts/'
- 'stats/'
- 'venvdir/'
- '.github/'
- 'docs/'
6 changes: 6 additions & 0 deletions .github/linters/.jscpd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"threshold": 10.0,
"reporters": ["console"],
"absolute": true,
"blame": true
}
166 changes: 83 additions & 83 deletions .github/workflows/calculate-public-usage.yml
Original file line number Diff line number Diff line change
@@ -1,83 +1,83 @@
# .github/workflows/calculate-public-usage.yml
name: Calculate Usage
on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
count_repos:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
persist-credentials: true
- name: Count unique repos referencing JF_URL
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Capture current date in YYYY-MM-DD (UTC)
current_date=$(date -u +%Y-%m-%d)
# Run the GitHub Code Search API, extract repo names, dedupe, and count
count=$(
curl -sSL \
-H "Authorization: Bearer $GH_TOKEN" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/search/code?q=%22JF_URL%3A+https%3A%2F%2Fartifacts-artefacts.devops.cloud-nuage.canada.ca%22+language%3AYAML+path%3A.github%2Fworkflows%2F" \
| jq -r '.items[].repository.full_name' \
| sort -u \
| wc -l
)
echo "Date: $current_date"
echo "Unique repos found: $count"
# Ensure data directory exists
mkdir -p stats
# Define the CSV file path
file="stats/usage.csv"
# If the file doesn't exist, add a header
if [ ! -f "$file" ]; then
echo "date,count" > "$file"
fi
# Append today's date and the count
echo "$current_date,$count" >> "$file"
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install plotting dependencies
run: |
pip install pandas matplotlib
- name: Generate XKCD-style usage graph
run: |
python3 scripts/generate_graph.py
- name: Commit and push updated data file + graph
run: |
# Configure git author
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# Stage CSV and PNG
git add stats/usage.csv stats/usage.png
# Commit changes if there are any
git commit -m "Add usage for $(date -u +%Y-%m-%d): ${{ steps.count_repos.outputs.count }}" || echo "No changes to commit"
# Push back to the default branch
git push
# .github/workflows/calculate-public-usage.yml
name: Calculate Usage

on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:

permissions:
contents: write

jobs:
count_repos:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v4
with:
persist-credentials: true

- name: Count unique repos referencing JF_URL
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Capture current date in YYYY-MM-DD (UTC)
current_date=$(date -u +%Y-%m-%d)

# Run the GitHub Code Search API, extract repo names, dedupe, and count
count=$(
curl -sSL \
-H "Authorization: Bearer $GH_TOKEN" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/search/code?q=%22JF_URL%3A+https%3A%2F%2Fartifacts-artefacts.devops.cloud-nuage.canada.ca%22+language%3AYAML+path%3A.github%2Fworkflows%2F" \
| jq -r '.items[].repository.full_name' \
| sort -u \
| wc -l
)

echo "Date: $current_date"
echo "Unique repos found: $count"

# Ensure data directory exists
mkdir -p stats

# Define the CSV file path
file="stats/usage.csv"

# If the file doesn't exist, add a header
if [ ! -f "$file" ]; then
echo "date,count" > "$file"
fi

# Append today's date and the count
echo "$current_date,$count" >> "$file"

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install plotting dependencies
run: |
pip install pandas matplotlib

- name: Generate XKCD-style usage graph
run: |
python3 scripts/generate_graph.py

- name: Commit and push updated data file + graph
run: |
# Configure git author
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

# Stage CSV and PNG
git add stats/usage.csv stats/usage.png

# Commit changes if there are any
git commit -m "Add usage for $(date -u +%Y-%m-%d): ${{ steps.count_repos.outputs.count }}" || echo "No changes to commit"

# Push back to the default branch
git push
40 changes: 40 additions & 0 deletions .github/workflows/cc-code-scanning.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Compliance Code Linting

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'

permissions: read-all

jobs:
build:
name: Full Code Scan
runs-on: ubuntu-latest

permissions:
contents: read
packages: read
statuses: write # To report GitHub Actions status checks

steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0

- name: Lint Codebase
uses: super-linter/super-linter/slim@v7.4.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # To report GitHub Actions status checks
VALIDATE_ALL_CODEBASE: true # Lint only changed files
SUPPRESS_POSSUM: true
LINTER_RULES_PATH: /
IGNORE_GITIGNORED_FILES: true
NATURAL_LANGUAGE_CONFIG_FILE: '.textlintrc.json'
PYTHON_BLACK_CONFIG_FILE: 'pyproject.toml'
PYTHON_ISORT_CONFIG_FILE: 'pyproject.toml'
PYTHON_RUFF_CONFIG_FILE: 'pyproject.toml'
PYTHON_PYINK_CONFIG_FILE: 'pyproject.toml'
VALIDATE_PYTHON_PYINK: false
18 changes: 9 additions & 9 deletions .github/workflows/java-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ on:
push:
branches: [main]
paths:
- "examples/java-app/**"
- ".github/workflows/**"
- 'examples/java-app/**'
- '.github/workflows/**'
pull_request:
branches: [main]
paths:
- "examples/java-app/**"
- ".github/workflows/**"
- 'examples/java-app/**'
- '.github/workflows/**'

env:
REGISTRY: artifacts-artefacts.devops.cloud-nuage.canada.ca
Expand Down Expand Up @@ -117,11 +117,11 @@ jobs:
JF_URL: https://${{ env.REGISTRY }}
JF_ACCESS_TOKEN: ${{ secrets.JFROG_JWT_TOKEN }}
JF_GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JF_GIT_USE_GITHUB_ENVIRONMENT: "false"
JF_INCLUDE_ALL_VULNERABILITIES: "true"
JF_ENABLE_SAST: "true"
JF_ENABLE_SECRETS: "true"
JF_ENABLE_IAC: "true"
JF_GIT_USE_GITHUB_ENVIRONMENT: 'false'
JF_INCLUDE_ALL_VULNERABILITIES: 'true'
JF_ENABLE_SAST: 'true'
JF_ENABLE_SECRETS: 'true'
JF_ENABLE_IAC: 'true'
summary:
needs: [build-and-scan, cleanup]
runs-on: ubuntu-latest
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/node-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ on:
push:
branches: [main]
paths:
- "examples/node-app/**"
- ".github/workflows/**"
- 'examples/node-app/**'
- '.github/workflows/**'
pull_request:
branches: [main]
paths:
- "examples/node-app/**"
- ".github/workflows/**"
- 'examples/node-app/**'
- '.github/workflows/**'
env:
REGISTRY: artifacts-artefacts.devops.cloud-nuage.canada.ca
IMAGE_NAME: ssc-aurora-docker-local/node-app
Expand Down Expand Up @@ -115,11 +115,11 @@ jobs:
JF_URL: https://${{ env.REGISTRY }}
JF_ACCESS_TOKEN: ${{ secrets.JFROG_JWT_TOKEN }}
JF_GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JF_GIT_USE_GITHUB_ENVIRONMENT: "false"
JF_INCLUDE_ALL_VULNERABILITIES: "true"
JF_ENABLE_SAST: "true"
JF_ENABLE_SECRETS: "true"
JF_ENABLE_IAC: "true"
JF_GIT_USE_GITHUB_ENVIRONMENT: 'false'
JF_INCLUDE_ALL_VULNERABILITIES: 'true'
JF_ENABLE_SAST: 'true'
JF_ENABLE_SECRETS: 'true'
JF_ENABLE_IAC: 'true'

summary:
needs: [build-and-scan, cleanup]
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/pr-code-scanning.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Code Linting

on:
push: {}
pull_request: {}
workflow_dispatch:

permissions: read-all

jobs:
build:
name: Incoming Scan Code
runs-on: ubuntu-latest

permissions:
contents: read
packages: read
statuses: write # To report GitHub Actions status checks

steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0

- name: Lint Incoming Changes
uses: super-linter/super-linter/slim@v7.4.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # To report GitHub Actions status checks
VALIDATE_ALL_CODEBASE: false # Lint only changed files
VALIDATE_CHECKOV: false
VALIDATE_JSCPD: false
SUPPRESS_POSSUM: true
LINTER_RULES_PATH: /
IGNORE_GITIGNORED_FILES: true
NATURAL_LANGUAGE_CONFIG_FILE: '.textlintrc.json'
PYTHON_BLACK_CONFIG_FILE: 'pyproject.toml'
PYTHON_ISORT_CONFIG_FILE: 'pyproject.toml'
PYTHON_RUFF_CONFIG_FILE: 'pyproject.toml'
PYTHON_PYINK_CONFIG_FILE: 'pyproject.toml'
VALIDATE_PYTHON_PYINK: false
Loading
Loading