Skip to content

Commit 3c5ee0d

Browse files
feat: add forge code for OSS (#1)
1 parent 6102616 commit 3c5ee0d

File tree

271 files changed

+12355
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+12355
-0
lines changed

.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
.DS_Store
2+
.bash_history
3+
4+
# Ignore Terraform state files
5+
*.tfstate
6+
*.tfstate.backup
7+
*.tfstate.backup.*
8+
9+
# Ignore override files
10+
override.tf
11+
override.tf.json
12+
*_override.tf
13+
*_override.tf.json
14+
15+
# Ignore Terraform plan files
16+
*.tfplan
17+
18+
# Ignore .terraform directory
19+
.terraform/
20+
21+
# Ignore Terraform state and lock files
22+
*.tflock
23+
.terraform.lock.hcl
24+
.terragrunt-cache
25+
providers
26+
27+
# Auth files. Sensitive.
28+
.auth/
29+
30+
artifacts
31+
32+
package

.pre-commit-config.yaml

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
---
2+
repos:
3+
# General Hooks
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v5.0.0
6+
hooks:
7+
- id: check-yaml
8+
always_run: true
9+
- id: end-of-file-fixer
10+
always_run: true
11+
- id: trailing-whitespace
12+
always_run: true
13+
args: [--markdown-linebreak-ext=md]
14+
- id: check-merge-conflict
15+
always_run: true
16+
- id: check-added-large-files
17+
always_run: true
18+
exclude: (images/*)
19+
- id: check-ast
20+
always_run: true
21+
- id: check-builtin-literals
22+
always_run: true
23+
- id: check-json
24+
always_run: true
25+
- id: check-toml
26+
always_run: true
27+
- id: check-xml
28+
always_run: true
29+
- id: detect-private-key
30+
always_run: true
31+
- id: mixed-line-ending
32+
always_run: true
33+
- id: debug-statements
34+
always_run: true
35+
- id: fix-encoding-pragma
36+
always_run: true
37+
- id: name-tests-test
38+
always_run: true
39+
- id: destroyed-symlinks
40+
always_run: true
41+
- id: check-docstring-first
42+
always_run: true
43+
- id: check-case-conflict
44+
always_run: true
45+
- id: double-quote-string-fixer
46+
always_run: true
47+
48+
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
49+
rev: 0.2.3
50+
hooks:
51+
- id: yamlfmt
52+
always_run: true
53+
args: [--mapping, '2', --sequence, '4', --offset, '2', --width, '180']
54+
exclude: (ansible/)
55+
56+
- repo: http://github.com/jumanjihouse/pre-commit-hooks
57+
rev: 3.0.0
58+
hooks:
59+
- id: shellcheck
60+
- id: shfmt
61+
args: [-i, '4', -w]
62+
- id: script-must-have-extension
63+
64+
- repo: https://github.com/adrienverge/yamllint
65+
rev: v1.37.0
66+
hooks:
67+
- id: yamllint
68+
69+
- repo: https://github.com/hadolint/hadolint
70+
rev: v2.13.1-beta
71+
hooks:
72+
- id: hadolint
73+
74+
# Python Hooks
75+
- repo: https://github.com/hhatto/autopep8
76+
rev: v2.3.2
77+
hooks:
78+
- id: autopep8
79+
80+
- repo: https://github.com/PyCQA/isort
81+
rev: 6.0.1
82+
hooks:
83+
- id: isort
84+
85+
- repo: https://github.com/PyCQA/autoflake
86+
rev: v2.3.1
87+
hooks:
88+
- id: autoflake
89+
90+
- repo: https://github.com/PyCQA/flake8
91+
rev: 7.2.0
92+
hooks:
93+
- id: flake8
94+
args:
95+
- --ignore=E501
96+
97+
# JSON Schema Hooks
98+
- repo: https://github.com/python-jsonschema/check-jsonschema
99+
rev: 0.33.0
100+
hooks:
101+
- id: check-github-workflows
102+
- id: check-github-actions
103+
args: [--verbose]
104+
- id: check-renovate
105+
106+
# Terraform Hooks
107+
- repo: https://github.com/gruntwork-io/pre-commit
108+
rev: v0.1.29
109+
hooks:
110+
- id: terragrunt-hclfmt
111+
112+
- repo: https://github.com/antonbabenko/pre-commit-terraform
113+
rev: v1.99.0
114+
hooks:
115+
- id: terraform_fmt
116+
args:
117+
- --hook-config=--tf-path=tofu
118+
always_run: true
119+
- id: terraform_tflint
120+
args:
121+
- --hook-config=--tf-path=tofu
122+
exclude: (modules/infra-modules/splunk_cloud_data_manager)
123+
always_run: true
124+
- id: terraform_validate
125+
args:
126+
- --hook-config=--retry-once-with-cleanup=true
127+
- --tf-init-args=-backend=false
128+
- --hook-config=--tf-path=tofu
129+
exclude: (modules/infra-modules/splunk_cloud_data_manager)
130+
always_run: true
131+
- id: terraform_docs
132+
always_run: true
133+
args:
134+
- --hook-config=--tf-path=tofu
135+
- --args=--config=.terraform-docs.yml
136+
exclude: (modules/infra-modules/splunk_cloud_data_manager)
137+
138+
# Security Hooks
139+
- repo: https://github.com/gitleaks/gitleaks
140+
rev: v8.25.1
141+
hooks:
142+
- id: gitleaks
143+
always_run: true
144+
145+
- repo: https://github.com/python-poetry/poetry
146+
rev: 2.1.2
147+
hooks:
148+
- id: poetry-check

.terraform-docs.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
formatter: markdown # this is required
3+
4+
version: ''
5+
6+
header-from: main.tf
7+
footer-from: ''
8+
9+
recursive:
10+
enabled: false
11+
12+
sections:
13+
hide: []
14+
show: []
15+
16+
content: ''
17+
18+
output:
19+
file: README.md
20+
mode: inject
21+
template: |-
22+
<!-- BEGIN_TF_DOCS -->
23+
{{ .Content }}
24+
<!-- END_TF_DOCS -->
25+
26+
output-values:
27+
enabled: false
28+
from: ''
29+
30+
sort:
31+
enabled: true
32+
by: name
33+
34+
settings:
35+
anchor: true
36+
color: true
37+
default: true
38+
description: false
39+
escape: true
40+
hide-empty: false
41+
html: true
42+
indent: 2
43+
lockfile: true
44+
read-comments: true
45+
required: true
46+
sensitive: true
47+
type: true

.yamllint

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
3+
# Specify the files to lint
4+
yaml-files:
5+
- '*.yaml'
6+
- '*.yml'
7+
- .yamllint
8+
9+
# Define the linting rules
10+
rules:
11+
braces: enable
12+
brackets: enable
13+
colons: enable
14+
commas: enable
15+
comments:
16+
level: error
17+
comments-indentation:
18+
level: error
19+
document-end: disable
20+
document-start:
21+
present: true # Ensure that documents start with '---'
22+
level: error # Set the level to error
23+
empty-lines: enable
24+
empty-values: disable
25+
hyphens: enable
26+
indentation:
27+
spaces: 2 # Use 2 spaces for indentation
28+
level: error # Set the level to error
29+
indent-sequences: true
30+
check-multi-line-strings: false
31+
key-duplicates: enable
32+
key-ordering: disable
33+
# Unavoidable due to long queries.
34+
line-length: disable
35+
new-line-at-end-of-file: enable
36+
new-lines: enable
37+
octal-values: disable
38+
quoted-strings: disable
39+
trailing-spaces:
40+
level: error # Warn about trailing spaces
41+
truthy:
42+
level: error

CODE_OF_CONDUCT.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
2+
# Contributor Covenant Code of Conduct
3+
4+
## Our Pledge
5+
6+
In the interest of fostering an open and welcoming environment, we as
7+
contributors and maintainers pledge to make participation in our project and
8+
our community a harassment-free experience for everyone, regardless of age, body
9+
size, disability, ethnicity, sex characteristics, gender identity and expression,
10+
level of experience, education, socio-economic status, nationality, personal
11+
appearance, race, religion, or sexual identity and orientation.
12+
13+
## Our Standards
14+
15+
Examples of behavior that contributes to creating a positive environment
16+
include:
17+
18+
- Using welcoming and inclusive language
19+
- Being respectful of differing viewpoints and experiences
20+
- Gracefully accepting constructive criticism
21+
- Focusing on what is best for the community
22+
- Showing empathy towards other community members
23+
24+
Examples of unacceptable behavior by participants include:
25+
26+
- The use of sexualized language or imagery and unwelcome sexual attention or
27+
advances
28+
- Trolling, insulting/derogatory comments, and personal or political attacks
29+
- Public or private harassment
30+
- Publishing others' private information, such as a physical or electronic
31+
address, without explicit permission
32+
- Other conduct which could reasonably be considered inappropriate in a
33+
professional setting
34+
35+
## Our Responsibilities
36+
37+
Project maintainers are responsible for clarifying the standards of acceptable
38+
behavior and are expected to take appropriate and fair corrective action in
39+
response to any instances of unacceptable behavior.
40+
41+
Project maintainers have the right and responsibility to remove, edit, or
42+
reject comments, commits, code, wiki edits, issues, and other contributions
43+
that are not aligned to this Code of Conduct, or to ban temporarily or
44+
permanently any contributor for other behaviors that they deem inappropriate,
45+
threatening, offensive, or harmful.
46+
47+
## Scope
48+
49+
This Code of Conduct applies within all project spaces, and it also applies when
50+
an individual is representing the project or its community in public spaces.
51+
Examples of representing a project or community include using an official
52+
project e-mail address, posting via an official social media account, or acting
53+
as an appointed representative at an online or offline event. Representation of
54+
a project may be further defined and clarified by project maintainers.
55+
56+
## Enforcement
57+
58+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
59+
reported by contacting the project team at [oss-conduct@cisco.com][conduct-email]. All
60+
complaints will be reviewed and investigated and will result in a response that
61+
is deemed necessary and appropriate to the circumstances. The project team is
62+
obligated to maintain confidentiality with regard to the reporter of an incident.
63+
Further details of specific enforcement policies may be posted separately.
64+
65+
Project maintainers who do not follow or enforce the Code of Conduct in good
66+
faith may face temporary or permanent repercussions as determined by other
67+
members of the project's leadership.
68+
69+
[conduct-email]: mailto:oss-conduct@cisco.com
70+
71+
## Attribution
72+
73+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
74+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
75+
76+
[homepage]: https://www.contributor-covenant.org
77+
78+
For answers to common questions about this code of conduct, see
79+
https://www.contributor-covenant.org/faq

0 commit comments

Comments
 (0)