-
Notifications
You must be signed in to change notification settings - Fork 0
Implement CSP reports collection Rails engine with Slack notifications #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement CSP reports collection Rails engine with Slack notifications #1
Conversation
Co-authored-by: burisu <240595+burisu@users.noreply.github.com>
Co-authored-by: burisu <240595+burisu@users.noreply.github.com>
|
@copilot Things to change:
|
…orkflows Co-authored-by: burisu <240595+burisu@users.noreply.github.com>
All requested changes have been implemented in commit cdf1573:
Tests updated to verify both CSP formats and new routing structure. |
.github/workflows/test.yml
Outdated
| ruby-version: ['3.0', '3.1', '3.2'] | ||
| rails-version: ['6.1', '7.0', '7.1'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adjust versions to support Ruby >= 3.2 and Rails >= 7.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in commit d82ec31. GitHub workflow now tests Ruby 3.2-3.3 and Rails 7.1-7.2. Also updated gemspec to require Ruby >= 3.2.0 and Rails >= 7.1.
| t.string :violated_directive | ||
| t.string :blocked_uri | ||
| t.text :original_policy | ||
| t.text :raw_report, null: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use JSONB instead of TEXT type for raw_report.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed in commit d82ec31. Migration now uses t.jsonb :raw_report, null: false, default: {}. Controller updated to store hash directly instead of JSON string. All tests updated accordingly.
burisu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Fix last review comments
Co-authored-by: burisu <240595+burisu@users.noreply.github.com>
burisu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Add rubocop-codeur gem and run rubocop to normalize Ruby code.
.github/workflows/test.yml
Outdated
|
|
||
| strategy: | ||
| matrix: | ||
| ruby-version: ['3.2', '3.3'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Don't forget Ruby 3.4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added Ruby 3.4 to the workflow matrix in commit 4e09c83.
|
@copilot Can you fix the tests too? |
Co-authored-by: burisu <240595+burisu@users.noreply.github.com>
Done in commit 4e09c83. Added rubocop-codeur as development dependency and normalized all Ruby code with:
|
Co-authored-by: burisu <240595+burisu@users.noreply.github.com>
Plan for implementing CSP reports collection Rails gem:
mountChanges made in this commit:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.