Skip to content

Add SC Environment Impact Workflow#2053

Merged
MichaelMraka merged 1 commit intoRedHatInsights:masterfrom
SteveHNH:add-sc-impact-workflow
Feb 12, 2026
Merged

Add SC Environment Impact Workflow#2053
MichaelMraka merged 1 commit intoRedHatInsights:masterfrom
SteveHNH:add-sc-impact-workflow

Conversation

@SteveHNH
Copy link
Contributor

@SteveHNH SteveHNH commented Feb 11, 2026

Adding a workflow to check for impactful SC environment changes. This will drop a comment in PRs to notify the author of impactful changes and notify the rosa core team slack channel. This is non-blocking and informational to better prevent issues during release week for the security compliance environment.

HCMSEC-2787

Secure Coding Practices Checklist GitHub Link

Secure Coding Checklist

  • Input Validation
  • Output Encoding
  • Authentication and Password Management
  • Session Management
  • Access Control
  • Cryptographic Practices
  • Error Handling and Logging
  • Data Protection
  • Communication Security
  • System Configuration
  • Database Security
  • File Management
  • Memory Management
  • General Coding Practices

Summary by Sourcery

CI:

  • Introduce a reusable GitHub Actions workflow that runs on master pushes and pull requests to check for impactful security compliance environment changes and notify maintainers via PR comments and Slack.

@sourcery-ai
Copy link

sourcery-ai bot commented Feb 11, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds a new non-blocking GitHub Actions workflow that runs on pushes and pull requests to master, invoking a shared reusable workflow to detect security compliance environment-impacting changes and notify both the PR and the SC assessor Slack channel.

Sequence diagram for SC environment impact workflow execution

sequenceDiagram
  actor Developer
  participant GitHubRepo
  participant SCEnvironmentCheckWorkflow
  participant SharedSCImpactWorkflow
  participant PRActions
  participant SlackWebhook

  Developer->>GitHubRepo: Push commit or open/update PR targeting master
  GitHubRepo->>SCEnvironmentCheckWorkflow: Trigger on push or pull_request

  SCEnvironmentCheckWorkflow->>SharedSCImpactWorkflow: call-reusable-workflow job (with SC_ASSESSOR_SLACK_URL)
  SharedSCImpactWorkflow->>GitHubRepo: Read contents (contents read)
  SharedSCImpactWorkflow->>PRActions: Analyze changes for SC environment impact
  PRActions-->>SharedSCImpactWorkflow: Impact assessment result

  alt Impactful changes detected
    SharedSCImpactWorkflow->>PRActions: Create informational PR comment (pull-requests write)
    SharedSCImpactWorkflow->>SlackWebhook: Post notification to SC assessor Slack channel
  else No impactful changes
    SharedSCImpactWorkflow-->>PRActions: No comment created
    SharedSCImpactWorkflow-->>SlackWebhook: No message sent
  end
Loading

File-Level Changes

Change Details Files
Introduce SC Environment Check GitHub Actions workflow leveraging a shared reusable workflow.
  • Define a new workflow triggered on push and pull_request events targeting the master branch.
  • Configure a single job that calls the shared sc-environment-impact-check reusable workflow from the RedHatInsights/shared-workflows repository.
  • Set minimal required permissions for the job, granting write access to pull requests and read access to contents.
  • Pass the SC_ASSESSOR_SLACK_URL secret into the reusable workflow for Slack notifications.
.github/workflows/sc-environment-impact.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The workflow description says it checks PRs, but the triggers include both push and pull_request on master; if you don’t intend Slack notifications and PR comments on direct pushes to master, consider removing the push trigger or clarifying the intent in the comments.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The workflow description says it checks PRs, but the triggers include both `push` and `pull_request` on `master`; if you don’t intend Slack notifications and PR comments on direct pushes to `master`, consider removing the `push` trigger or clarifying the intent in the comments.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov-commenter
Copy link

codecov-commenter commented Feb 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.36%. Comparing base (ff33bf9) to head (c39aafb).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2053      +/-   ##
==========================================
- Coverage   59.39%   59.36%   -0.03%     
==========================================
  Files         134      134              
  Lines        8678     8678              
==========================================
- Hits         5154     5152       -2     
- Misses       2977     2979       +2     
  Partials      547      547              
Flag Coverage Δ
unittests 59.36% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Adding a workflow to check for impactful SC environment changes. This
will drop a comment in PRs to notify the author of impactful changes and
notify the rosa core team slack channel. This is non-blocking and
informational to better prevent issues during release week for the
security compliance environment.

HCMSEC-2787

Signed-off-by: Stephen Adams <sadams@redhat.com>
@SteveHNH SteveHNH force-pushed the add-sc-impact-workflow branch from 90219d0 to c39aafb Compare February 11, 2026 19:17
@MichaelMraka MichaelMraka merged commit 12e6bc1 into RedHatInsights:master Feb 12, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants