Skip to content

Commit b7c57f8

Browse files
committed
Merge branch 'main' into fix/install-script-bugs
2 parents 77d0aee + cf65caf commit b7c57f8

81 files changed

Lines changed: 22781 additions & 325 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Security Scan
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 'release/**'
8+
pull_request:
9+
branches:
10+
- main
11+
- 'release/**'
12+
13+
jobs:
14+
bandit-scan:
15+
name: Bandit Security Scan
16+
runs-on: linux-ubuntu-latest
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: '3.10'
26+
27+
- name: Install Bandit
28+
run: pip install bandit[toml]
29+
30+
- name: Run Bandit security scan
31+
run: |
32+
bandit -r . \
33+
--exclude ./tests,./venv,./node_modules,./.venv,./docs/sat/node_modules \
34+
-lll \
35+
-f screen
36+

.gitignore

Lines changed: 62 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111
/configs/security_best_practices_user.csv
1212
.databricks/
1313
.vscode/settings.json
14+
CLAUDE.md
1415

1516
# Byte-compiled / optimized / DLL files
1617
__pycache__/
17-
.DS_Store
18-
.pytest_cache/
18+
*.py[cod]
19+
*$py.class
1920

2021
# C extensions
2122
*.so
2223

2324
# Distribution / packaging
24-
.idea
2525
.Python
2626
build/
2727
develop-eggs/
@@ -35,16 +35,13 @@ parts/
3535
sdist/
3636
var/
3737
wheels/
38-
pip-wheel-metadata/
3938
share/python-wheels/
4039
*.egg-info/
4140
.installed.cfg
4241
*.egg
4342
MANIFEST
4443

4544
# PyInstaller
46-
# Usually these files are written by a python script from a template
47-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
4845
*.manifest
4946
*.spec
5047

@@ -65,6 +62,7 @@ coverage.xml
6562
*.py,cover
6663
.hypothesis/
6764
.pytest_cache/
65+
cover/
6866

6967
# Translations
7068
*.mo
@@ -87,6 +85,7 @@ instance/
8785
docs/_build/
8886

8987
# PyBuilder
88+
.pybuilder/
9089
target/
9190

9291
# Jupyter Notebook
@@ -100,13 +99,15 @@ ipython_config.py
10099
.python-version
101100

102101
# pipenv
103-
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
104-
# However, in case of collaboration, if having platform-specific dependencies or dependencies
105-
# having no cross-platform support, pipenv may install dependencies that don't work, or not
106-
# install all needed dependencies.
107-
#Pipfile.lock
102+
Pipfile.lock
103+
104+
# poetry
105+
poetry.lock
108106

109-
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
107+
# pdm
108+
.pdm.toml
109+
110+
# PEP 582
110111
__pypackages__/
111112

112113
# Celery stuff
@@ -134,6 +135,7 @@ venv.bak/
134135

135136
# mkdocs documentation
136137
/site
138+
docs/sat/site/
137139

138140
# mypy
139141
.mypy_cache/
@@ -143,7 +145,54 @@ dmypy.json
143145
# Pyre type checker
144146
.pyre/
145147

148+
# pytype static type analyzer
149+
.pytype/
150+
151+
# Cython debug symbols
152+
cython_debug/
153+
154+
# IDE
155+
.vscode/
156+
.idea/
157+
*.swp
158+
*.swo
159+
*~
160+
161+
# OS
162+
.DS_Store
163+
Thumbs.db
164+
desktop.ini
165+
166+
# Temporary files
167+
temp/
168+
tmp/
169+
*.tmp
170+
*.temp
171+
*.bak
172+
*.backup
173+
174+
# Terraform
175+
*.tfstate
176+
*.tfstate.*
177+
.terraform/
178+
.terraform.lock.hcl
179+
terraform/aws/models
180+
181+
# Project-specific
182+
claude_js/
183+
notebooks/.ipynb_checkpoints/
184+
185+
# Build artifacts
186+
*.whl
187+
*.tar.gz
188+
189+
# Logs
190+
*.log
146191

147192
**/.terraform*
148193
**/terraform.tfvars
149-
**/terraform.tfstate*
194+
**/terraform.tfstate*
195+
196+
# Project documentation and planning files
197+
CLAUDE.md
198+
docs/*Implementation_Plan.html

CONTRIBUTING.md

Lines changed: 210 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,210 @@
1-
We happily welcome contributions. We accept PRs pursuant to a CLA.
1+
# Contributing to Security Analysis Tool (SAT)
2+
3+
Thank you for your interest in contributing to the Databricks Security Analysis Tool! We welcome contributions from the community, and we accept PRs pursuant to a CLA.
4+
5+
## Getting Started
6+
7+
Before you begin:
8+
9+
1. **Check existing issues**: Look through [GitHub Issues](https://github.com/databricks-industry-solutions/security-analysis-tool/issues) to see if your bug report or feature request already exists
10+
2. **Read the documentation**: Familiarize yourself with [SAT Documentation](https://databricks-industry-solutions.github.io/security-analysis-tool/)
11+
3. **Understand the project structure**: Review the codebase organization
12+
13+
### Project Structure
14+
15+
```
16+
security-analysis-tool/
17+
├── src/ # Python SDK source code
18+
│ ├── securityanalysistoolproject/ # Main SAT SDK
19+
│ └── brickhound/ # Permissions & Resources Analysis
20+
├── notebooks/ # Databricks notebooks
21+
│ ├── Setup/ # Installation and configuration
22+
│ ├── Includes/ # Helper modules
23+
│ └── brickhound/ # Permissions & Resources Analysis notebooks
24+
├── app/brickhound/ # Permissions & Resources Analysis web UI
25+
├── terraform/ # Infrastructure as Code SAT Installation
26+
├── dabs/ # Databricks Asset Bundles SAT Installation
27+
├── configs/ # Configuration files
28+
├── dashboards/ # AI/BI dashboard
29+
└── docs/ # Documentation site
30+
```
31+
32+
## Development Setup
33+
34+
### Prerequisites
35+
36+
- Python 3.8 or higher
37+
- Access to a Databricks workspace (for testing)
38+
- Git
39+
40+
### Local Setup
41+
42+
1. **Clone the repository**:
43+
```bash
44+
git clone https://github.com/databricks-industry-solutions/security-analysis-tool.git
45+
cd security-analysis-tool
46+
```
47+
48+
2. **Set up Python environment**:
49+
```bash
50+
python -m venv .venv
51+
source .venv/bin/activate # On Windows: .venv\Scripts\activate
52+
53+
# Install SDK in development mode
54+
cd src/securityanalysistoolproject
55+
pip install -e .
56+
```
57+
58+
3. **Install development dependencies**:
59+
```bash
60+
pip install pytest
61+
```
62+
63+
## How to Contribute
64+
65+
### Types of Contributions
66+
67+
We welcome:
68+
69+
1. **Bug Fixes** - Fix issues in existing code
70+
2. **New Features** - Add new security checks or analysis capabilities
71+
3. **Documentation** - Improve or add documentation
72+
4. **Testing** - Add or improve test coverage
73+
74+
### Reporting Bugs
75+
76+
When reporting bugs, please include:
77+
78+
- Clear description of what happened vs. what you expected
79+
- Steps to reproduce the issue
80+
- Environment details (Databricks runtime, cloud provider, SAT version)
81+
- Error messages and stack traces
82+
- Screenshots if applicable
83+
84+
**Security vulnerabilities** should be reported to `bugbounty@databricks.com` (see [SECURITY.md](SECURITY.md))
85+
86+
### Suggesting Features
87+
88+
When suggesting features, explain:
89+
90+
- The use case and why it would be useful
91+
- How you envision it working
92+
- Who would benefit from it
93+
94+
## Pull Request Process
95+
96+
### Branch Naming
97+
98+
Use descriptive branch names:
99+
- `feature/add-azure-security-check`
100+
- `bugfix/fix-aws-credential-scan`
101+
- `docs/update-installation-guide`
102+
103+
### Submitting a Pull Request
104+
105+
1. **Fork the repository** and create your branch from `main`:
106+
```bash
107+
git checkout -b feature/your-feature-name
108+
```
109+
110+
2. **Make your changes**:
111+
- Write clear, readable code
112+
- Add tests for new functionality
113+
- Update documentation as needed
114+
115+
3. **Commit your changes**:
116+
```bash
117+
git commit -m "Add new Azure security check for Key Vault
118+
119+
- Added check for Key Vault soft delete
120+
- Added unit tests
121+
- Updated documentation"
122+
```
123+
124+
4. **Push to your fork** and open a Pull Request with a clear description
125+
126+
### Commit Message Format
127+
128+
Use clear, descriptive commit messages:
129+
130+
- `feat: add new feature`
131+
- `fix: resolve bug`
132+
- `docs: update documentation`
133+
- `test: add tests`
134+
135+
### Pull Request Review
136+
137+
- At least one maintainer must approve the PR
138+
- All tests must pass
139+
- Documentation must be updated if needed
140+
141+
## Testing
142+
143+
Run tests before submitting:
144+
145+
```bash
146+
cd src/securityanalysistoolproject
147+
pytest
148+
```
149+
150+
## Documentation
151+
152+
### Updating Documentation
153+
154+
When making changes:
155+
156+
1. Update inline documentation (docstrings)
157+
2. Update user-facing docs in `docs/sat/docs/` if needed
158+
3. Update README if necessary
159+
4. Update CHANGELOG.md
160+
161+
### Preview Documentation
162+
163+
```bash
164+
cd docs/sat
165+
npm install
166+
npm start
167+
```
168+
169+
## Versioning
170+
171+
SAT follows **Semantic Versioning** (SemVer): `MAJOR.MINOR.PATCH`
172+
173+
- **MAJOR**: Incompatible API changes
174+
- **MINOR**: New features (backward-compatible)
175+
- **PATCH**: Bug fixes (backward-compatible)
176+
177+
See [VERSIONING.md](VERSIONING.md) for detailed guidelines.
178+
179+
### Branch Strategy
180+
181+
- `main`: Stable production releases
182+
- `release/x.x.x`: Release preparation branches
183+
- `feature/*`: New features
184+
- `bugfix/*`: Bug fixes
185+
186+
## Code Style
187+
188+
- Follow PEP 8 conventions
189+
- Use meaningful variable and function names
190+
- Add docstrings to public functions
191+
- Handle errors appropriately
192+
- Don't commit sensitive data (credentials, tokens, etc.)
193+
194+
## License and CLA
195+
196+
By contributing to this project, you agree to the Contributor License Agreement (CLA). All pull requests require CLA acceptance before merging.
197+
198+
This project is licensed under the Databricks License. See [LICENSE](LICENSE) for details.
199+
200+
## Getting Help
201+
202+
- **Documentation**: https://databricks-industry-solutions.github.io/security-analysis-tool/
203+
- **GitHub Issues**: For bug reports and feature requests
204+
- **Security Issues**: bugbounty@databricks.com
205+
206+
## Recognition
207+
208+
Contributors are recognized in release notes and CHANGELOG.md.
209+
210+
Thank you for contributing to SAT! 🔒

0 commit comments

Comments
 (0)