Skip to content

Commit 7cac93b

Browse files
authored
Enhance GitHub PR comment experience (#26)
* Add support for PR labels and linking to full report * Add support for rule name, collapsible fields * Add helper functions for GitHub PR comments * Pass config for repository metadata and feature flags * Expand notification configuration params * Augment existing GHA docs to explain configuration options * Add unit tests for new GH helper functionality * Update GHA manifest to include new params * Update git ignore to handle new docs * Update README with new PR comment functionality * Update helper tests import * Update all connectors to have PR comment feature parity * Centralize all GitHub PR helper logic * Update README with new enhancements * Fix clickable links and auto-collapse logic * Prune GHA workspace path prefixes * Update connector formatting Signed-off-by: lelia <lelia@socket.dev> * Colorize GitHub PR label options Signed-off-by: lelia <lelia@socket.dev> * Better filepath formatting, CVE links, CVSS scores Signed-off-by: lelia <lelia@socket.dev> * Update helper tests to cover new functionality Signed-off-by: lelia <lelia@socket.dev> * Wrap standard connector logic Signed-off-by: lelia <lelia@socket.dev> * Wrap connector logic, add support for 32px logo * Add 32x32px Socket logo asset Signed-off-by: lelia <lelia@socket.dev> * Overhaul git ignore with better structure and categories Signed-off-by: lelia <lelia@socket.dev> * Update README to reflect new GHA functionality, dedupe usage examples Signed-off-by: lelia <lelia@socket.dev> * Add README to cover unit/integration testing with pytest Signed-off-by: lelia <lelia@socket.dev> * Clean up and deduplicate GHA docs Signed-off-by: lelia <lelia@socket.dev> * Update CI/CD install refs to defer to GHA docs Signed-off-by: lelia <lelia@socket.dev> * Add docs to cover new GitHub PR comment functionality and config Signed-off-by: lelia <lelia@socket.dev> * Apply filepath cleaning logic to text formatting Signed-off-by: lelia <lelia@socket.dev> * Fix formatting logic to enable jumping to specific LoC Signed-off-by: lelia <lelia@socket.dev> * Whitespace change to test commit signing Signed-off-by: lelia <lelia@socket.dev> * Second whitespace commit for signing test Signed-off-by: lelia <lelia@socket.dev> * Testing new signing key with verified email Signed-off-by: lelia <lelia@socket.dev> * Update PR logic to handle GH markdown rendering of HTML Signed-off-by: lelia <lelia@socket.dev> * Add dev script to preview PR comment formatting behavior Signed-off-by: lelia <lelia@socket.dev> * Add unittests for PR formatting Signed-off-by: lelia <lelia@socket.dev> * Update ignore file to include new dev scripts Signed-off-by: lelia <lelia@socket.dev> * Prepare for minor version release to 1.1.0 Signed-off-by: lelia <lelia@socket.dev> * Use stable favicon logo asset URL Signed-off-by: lelia <lelia@socket.dev> * Document required perms for PR labels Signed-off-by: lelia <lelia@socket.dev> * Remove unused github helper Signed-off-by: lelia <lelia@socket.dev> --------- Signed-off-by: lelia <lelia@socket.dev>
1 parent 635f90f commit 7cac93b

28 files changed

Lines changed: 3546 additions & 367 deletions

.gitignore

Lines changed: 67 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,114 +1,105 @@
1-
2-
.idea
3-
venv
4-
.venv
5-
build
6-
dist
7-
*.build
8-
*.dist
9-
*.egg-info
10-
test
11-
*.env
12-
run_container.sh
13-
*.zip
14-
bin
15-
# Note: Ignore any local dev scripts, but include ones used by the project
16-
scripts/*.py
17-
!scripts/enrich_rules.py
18-
!scripts/rewrite_messages.py
19-
!scripts/update_cwe_catalog.py
20-
!scripts/verify_jira_dashboard_config.py
21-
*.json
22-
markdown_overview_temp.md
23-
markdown_security_temp.md
1+
# OS files
242
.DS_Store
25-
*.pyc
26-
test.py
273

28-
# Note: requirements.txt is no longer needed - using pyproject.toml + uv.lock instead
29-
# Version files are auto-managed by .hooks/version-check.py
30-
*.cpython-312.pyc
31-
file_generator.py
32-
.env
33-
*.md
34-
!README.md
35-
!docs/*.md
36-
!tests/README.md
37-
test_results
38-
local_tests/
39-
custom_rules/
4+
# IDEs and editors
5+
.idea/
6+
.vscode/
7+
*.sublime-workspace
8+
*.sublime-project
9+
*.swp
10+
*~
4011

41-
# Common Python ignores
12+
# Python
4213
__pycache__/
4314
*.py[cod]
4415
*$py.class
16+
.python-version
17+
18+
# Virtual environments
19+
venv/
20+
.venv/
21+
env/
22+
ENV/
23+
env.bak/
24+
venv.bak/
25+
26+
# Build and distribution
27+
build/
28+
dist/
29+
*.build
30+
*.dist
31+
*.egg-info
32+
.eggs/
33+
*.egg
34+
35+
# Testing and coverage
4536
.pytest_cache/
4637
.mypy_cache/
4738
.coverage
4839
.coverage.*
4940
htmlcov/
41+
coverage/
42+
coverage.xml
43+
nosetests.xml
44+
test-results/
45+
test_results/
46+
47+
# pip
5048
pip-wheel-metadata/
5149
pip-log.txt
5250
pip-delete-this-directory.txt
5351

54-
# Virtual environments
55-
env/
56-
ENV/
57-
env.bak/
58-
venv.bak/
59-
60-
# IDEs and editors
61-
.vscode/
62-
.idea/
63-
*.sublime-workspace
64-
*.sublime-project
65-
*.swp
66-
*~
67-
6852
# Node
6953
node_modules/
7054
npm-debug.log*
7155
yarn-debug.log*
7256
yarn-error.log*
7357
.pnp/
7458

75-
# Build and distribution
76-
.eggs/
77-
*.egg
78-
dist/
79-
build/
80-
81-
# Coverage and test output
82-
coverage/
83-
coverage.xml
84-
nosetests.xml
85-
test-results/
59+
# Jupyter
60+
.ipynb_checkpoints/
8661

8762
# Logs and runtime files
88-
logs/
89-
63+
*.log
9064
*.pid
9165
*.sock
66+
logs/
9267

93-
# OS files
94-
.DS_Store
68+
# Temporary files
69+
*.tmp
70+
*.temp
71+
*.zip
9572

9673
# Binary and compiled
9774
*.exe
9875
*.dll
9976
*.so
10077
*.dylib
10178

102-
# Jupyter
103-
.ipynb_checkpoints/
104-
105-
# Local temporary files
106-
*.tmp
107-
*.temp
108-
# Ignore output logs and generated src files
109-
*.log
79+
# Environment and secrets
80+
*.env
11081

111-
.python-version
82+
# Data files (generated)
83+
*.json
11284
.socket.fact.json
11385

86+
# Markdown: ignore all except documentation
87+
*.md
88+
!README.md
89+
!docs/*.md
90+
!tests/README.md
91+
92+
# Project-specific (local scripts and test files)
93+
test/
94+
test.py
95+
run_container.sh
96+
bin/
97+
scripts/*.py
98+
!scripts/enrich_rules.py
99+
!scripts/rewrite_messages.py
100+
!scripts/update_cwe_catalog.py
101+
!scripts/verify_jira_dashboard_config.py
102+
!scripts/preview_pr_comments.py
103+
file_generator.py
104+
local_tests/
114105
custom_rules/

0 commit comments

Comments
 (0)