Skip to content
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

chore(OSSF): update branch protection to improve OSSF scorecard #780

Closed

Conversation

Sabarivasan-Velayutham
Copy link

Issue: Bump OSSF Score Above 9.0 ⬆️

image

This pull request focuses on improving the security configuration of our repository to enhance our OSSF Scorecard rating above 9.0. This involved changes in protections and access token usage.


Changes Implemented

  1. Enhanced Security Configurations
    • Applied branch protection rules to the main branch to strengthen security, which includes:
      • Required Pull Requests for all changes on main.
      • Dismiss Stale Reviews to ensure each approval reflects the latest commit.
      • Require Approvals with a minimum of 2 reviewers.
      • Up-to-Date Branches must be maintained for pull requests targeting main.
      • CODEOWNERS file added in the .github folder to enforce code ownership and ensure critical files receive proper review before merging.

image


image

  1. Improved OSSF Scorecard Rating
    • Classic Token Usage: To generate the necessary permissions for Scorecard evaluation, a classic token was created with repo, read:org and read:discussion scopes. Fine-grained tokens may not provide the required permissions.

image
image


Benefits

  • Enhanced Security Posture: By strictly scoping token permissions and enforcing protective branch rules, we mitigate the risk of unauthorized access or privilege misuse.
  • Scorecard Improvement: Adopting these changes significantly boosts our OSSF Scorecard score, reflecting our commitment to security best practices.

Checklist

  • ✅ Established critical branch protections for main.
  • ✅ Created a CODEOWNERS file to enforce ownership and improve scorecard evaluation.

Copy link

linux-foundation-easycla bot commented Nov 5, 2024

CLA Not Signed

Copy link

netlify bot commented Nov 5, 2024

Deploy Preview for endearing-brigadeiros-63f9d0 canceled.

Name Link
🔨 Latest commit 368967f
🔍 Latest deploy log https://app.netlify.com/sites/endearing-brigadeiros-63f9d0/deploys/672e2d1c4067770008317abe

@Sabarivasan-Velayutham
Copy link
Author

@JamieSlome I am a fresher working in Citi and I have sent an authorization request as a Corporate Contributor for EasyCLA. Can you please approve it?

Copy link
Contributor

@laukik-target laukik-target left a comment

Choose a reason for hiding this comment

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

  1. Remove .env.development, package.json, package-lock.json
  2. I don't see any change related to branch protection.

Please revise your change.

@JamieSlome I think Branch Protection Settings can be updated by Maintainers only as we do not have access to update the settings.

@Sabarivasan-Velayutham
Copy link
Author

@JamieSlome I am a fresher working in Citi and I have sent an authorization request as a Corporate Contributor for EasyCLA. Can you please approve it?

Hey, better to contribute as an Individual. if your GitHub account is Personal then select individual.

I am participating in Citi hackathon, so is it fine to contribute as an individual instead of Corporate Contributor ? I guess for those who take part in hackathon needs authorization request as a Corporate Contributor, am i right ?

06kellyjac and others added 8 commits November 8, 2024 20:48
Have the service report back the proxyURL for each project, rather than
being embedded inside the frontend bundle.
Concequence is duplicating some data but very minor and allows for us to serve
different projects from different proxies in the future.
Removed unused vite env var, added method to pull service's current path and substitute
in the http proxy port. Works for local dev, should maintain current behaviour.
Custom domain can be applied via optional config.
New config value added to the config schema.
Config schema documentation has been regenerated (including some other absent items).
This commit modifies the directory creation permissions in the pullRemote function of pullRemote.js. 

Previously, the function was setting directory permissions to 0777 (full read, write, and execute permissions for user, group, and others). This approach is not aligned with best practices for security, particularly in secure environments such as OpenShift, where overly permissive settings can lead to vulnerabilities.

The updated code now sets the permissions to 0755 (read, write, and execute for the user; read and execute for group and others). This change enhances security by restricting write access to the owner only while still allowing necessary read and execute permissions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants