Skip to content

Conversation

@udayk-port
Copy link
Contributor

Description

  1. Introduce OWASP Top 10 score card with Snyk
  2. Re-organize

Added docs pages

The following paths have been added

  • /promote-scorecards/examples/
  • /promote-scorecards/examples/Benchmarking%20against%20OWASP%20Top%2010
  • /promote-scorecards/examples/Dora%20metrics%20based%20on%20number%20of%20deployments
  • /promote-scorecards/examples/Ensure%20relation%20existence
  • /promote-scorecards/examples/Ownership%20Scorecard

Updated docs pages

This path now has a new page markdown under the folder structure to help accomodate more sub-sections

  • /promote-scorecards/examples/

@aws-amplify-eu-west-1
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-2649.d2ngvl90zqbob8.amplifyapp.com

@udayk-port
Copy link
Contributor Author

Fixing typos and making minor improvements soon. ETA: 11th Monday 12 Noon AEST. Please do not merge

@github-actions github-actions bot deleted a comment from claude bot Aug 12, 2025
@github-actions github-actions bot deleted a comment from claude bot Aug 12, 2025
@github-actions github-actions bot deleted a comment from claude bot Aug 12, 2025
@github-actions github-actions bot deleted a comment from claude bot Aug 13, 2025
Copy link
Collaborator

@kodjomiles kodjomiles left a comment

Choose a reason for hiding this comment

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

Some few comments

Copy link
Collaborator

Choose a reason for hiding this comment

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

rename the file to follow the same file naming conventions (ie begin with small letters, like examples.md)

Comment on lines 4 to 8

- [Dora Metrics based on number of deployments](/promote-scorecards/examples/dora-metrics-deployments/)
- [Ensure relation exists](/promote-scorecards/examples/relation-existence/)
- [Ownership scorecard](/promote-scorecards/examples/Ownership-scorecard/)
- [Owasp Top 10](/promote-scorecards/examples/Owasp-Top10/) No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks odd, Can we have a section for examples in the promote scorecard page, and then the link will lead to this page.

It will also be good if they were cards. the page looks weird with just the links

# Owasp Top 10 Scorecard

<img src="/img/guides/owasp/chart.png" width="80%" border="1px" alt="OWASP Top 10 Chart showing Gold, Silver and Basic tier distribution" />

Copy link
Collaborator

Choose a reason for hiding this comment

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

add a line break here to detach the bottom context a bit slightly from the image

Comment on lines 12 to 14
1. Repository – The primary entity where the Scorecard will reside.
2. Snyk Target – Contains entities that will be evaluated against 10 rules, each corresponding to an entry in the OWASP Top 10.
3. Snyk Vulnerability – Contains entities representing individual vulnerabilities of various types.
Copy link
Collaborator

Choose a reason for hiding this comment

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

You should move this to prerequisite and reference the integrations that need to be setup for this documentation. So user's before hand know which integrations are needed to follow through with this example

2. Snyk Target – Contains entities that will be evaluated against 10 rules, each corresponding to an entry in the OWASP Top 10.
3. Snyk Vulnerability – Contains entities representing individual vulnerabilities of various types.

**Prerequisites:**
Copy link
Collaborator

Choose a reason for hiding this comment

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

Change to a header tag

Prerequisite

Comment on lines 17 to 18
- GitHub / SCM – Repositories must be onboarded to Snyk and listed in the Portal Catalog.
- Snyk – The Exporter must be configured in your portal.
Copy link
Collaborator

Choose a reason for hiding this comment

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

There's a way we put this.

This guide assumes you have a Port account and that you have finished the onboarding process.
Install Port's GitHub app
Install Port's Snyk integration

Comment on lines 21 to 50
#### Snyk Vulnerability

To accurately benchmark against the OWASP Top 10 for code, most static analysis tools support generating Common Weakness Enumeration (CWE) IDs. If CWEs are not yet included in your blueprint, you can add them to the Snyk Vulnerability blueprint by following these steps:
- Navigate to the Builder.
- Go to Data Sources.
- Under Exporters for Snyk, select Snyk Vulnerability Blueprint.
- In the Mapping section, under the vulnerability kind, add the following property mapping.

```json showLineNumbers
cwe: .attributes.classes[0].id
```
5. Resync data from Snyk exporter.
6. Navigate to catalog table to confirm that CWEs are now visible.

#### Snyk Target

- The Snyk Vulnerability and Snyk Target entities are connected through both the Snyk Target ID (via Snyk Target) and the Snyk Project ID (via Snyk Project).
- Now that CWEs are available, we can leverage the Snyk Target blueprint to classify security issues and group them by CWE categories, following the OWASP Top 10 framework.
- Accordingly, the Snyk Target blueprint can be updated to support classification of vulnerabilities under the OWASP Top 10(http://owasp.org/Top10), as demonstrated in L300–L774.
- The objective is to create 10 dedicated properties within Snyk Target, each corresponding to one of the OWASP Top 10 categories for code.

<details>
<summary><b>Snyk Target Blueprint reference</b></summary>
```json showLineNumbers
{
"identifier": "snykTarget",
"title": "Snyk Target",
"icon": "Snyk",
"schema": {
"properties": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Move all the blueprint related setup to a header called ## Set up data model

Comment on lines 23 to 33
To accurately benchmark against the OWASP Top 10 for code, most static analysis tools support generating Common Weakness Enumeration (CWE) IDs. If CWEs are not yet included in your blueprint, you can add them to the Snyk Vulnerability blueprint by following these steps:
- Navigate to the Builder.
- Go to Data Sources.
- Under Exporters for Snyk, select Snyk Vulnerability Blueprint.
- In the Mapping section, under the vulnerability kind, add the following property mapping.

```json showLineNumbers
cwe: .attributes.classes[0].id
```
5. Resync data from Snyk exporter.
6. Navigate to catalog table to confirm that CWEs are now visible.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Move this to a separate header called update data source and let the blueprint setup come before the mapping update happens

@github-actions github-actions bot deleted a comment from claude bot Aug 13, 2025
@github-actions github-actions bot deleted a comment from claude bot Aug 13, 2025
@github-actions github-actions bot deleted a comment from claude bot Aug 14, 2025
@github-actions github-actions bot deleted a comment from claude bot Aug 14, 2025
@github-actions github-actions bot deleted a comment from claude bot Aug 17, 2025
@sivanel97 sivanel97 requested a review from kodjomiles August 17, 2025 07:37
@github-actions github-actions bot deleted a comment from claude bot Aug 18, 2025
@claude
Copy link

claude bot commented Aug 18, 2025

Claude finished @udayk-port's task —— View job


PR Review Complete ✅

Reviewing PR #2649: "Promote scorecards with OWASP Top 10 examples"

Todo List:

  • Read CONTRIBUTING.md guidelines
  • Review modified documentation file
  • Check against previous reviewer feedback
  • Provide comprehensive review feedback

📋 Overall Assessment

This PR adds a comprehensive OWASP Top 10 scorecard example to the documentation, which is valuable content. However, there are several issues that need to be addressed to meet Port's documentation standards.

🎯 Major Issues

1. File Organization & Structure

  • The file was previously docs/promote-scorecards/examples/Examples.md (per review comments) but should be renamed to follow lowercase conventions (examples.md)
  • Consider restructuring the page to use cards for better visual hierarchy instead of just links

2. OWASP Section Issues

The OWASP Top 10 section has several structural problems:

Prerequisites Section (lines 164-167)

Current format:

<h2>Prerequisites</h2>
- This example assumes you have a Port account...

Should be:

## Prerequisites

This guide assumes you have a Port account and that you have finished the [onboarding process](https://docs.port.io/getting-started/overview).

**Required integrations:**
- Install Port's [GitHub app](https://docs.port.io/build-your-software-catalog/sync-data-to-catalog/git/github/#setup)
- Install Port's [Snyk integration](https://docs.port.io/build-your-software-catalog/sync-data-to-catalog/code-quality-security/snyk/)

Content Structure Issues

  • Line 109: Typo "blueprtint" should be "blueprint"
  • Lines 186-194: Code block not properly formatted within collapsible section
  • Line 155: Image needs line break separation from surrounding content
  • Lines 1034-1051: "Next steps" section needs better formatting and structure

3. Writing Style & Tone Issues

Inconsistent Voice (Line 157)

❌ Current: "This section explains how to build..."
✅ Should be: "Let's build..." (following "We" language guideline)

British vs American Spelling (Line 1046)

❌ Current: "customised", "organisation's"
✅ Should be: "customized", "organization's"

Typo (Line 1051)

❌ Current: "security weaknesss"
✅ Should be: "security weakness"

4. Technical Content Issues

Formatting Standards

  • Missing proper spacing around sections
  • HTML tags used instead of markdown headers in some places
  • Inconsistent code block formatting within collapsible sections

Link and Reference Issues

  • All internal links should use full paths (per guidelines)
  • Some code examples could benefit from better commenting
  • Images properly formatted but could use better context

📝 Detailed Line-by-Line Review

Line Issue Fix
109 Typo: "blueprtint" Change to "blueprint"
155 Image needs spacing Add line break after image
157 Tone inconsistency Change "This section explains" to "Let's build"
164-167 HTML headers instead of markdown Use ## instead of <h2>
186-194 Code formatting in details Fix JSON formatting
1034 Informal tone "Some common issues" → proper heading
1046 British spelling "customised" → "customized"
1051 Typo "weaknesss" → "weakness"

🔧 Recommendations

High Priority

  1. Fix the file naming convention issue mentioned by previous reviewer
  2. Convert HTML headers to proper markdown headers (## not <h2>)
  3. Restructure prerequisites section with proper formatting
  4. Fix spelling and grammar issues

Medium Priority

  1. Improve the examples page layout with cards instead of plain links
  2. Add proper spacing between sections using <br /> where needed
  3. Ensure consistent "We" language throughout the guide

Low Priority

  1. Consider adding more troubleshooting scenarios
  2. Enhance next steps section with more actionable items

Positive Aspects

  • Comprehensive technical content: The OWASP integration is well-documented with complete JSON configurations
  • Good use of collapsible sections: Proper use of details/summary for large code blocks
  • Helpful troubleshooting section: Addresses common implementation issues
  • Complete end-to-end example: Covers all necessary steps from setup to implementation

🚧 Previous Review Comments Status

Addressed:

  • ✅ OWASP section improvements by hadar-co have been incorporated

Still Need Attention:

  • ❌ File naming convention (kodjomiles feedback)
  • ❌ Page layout improvements with cards (kodjomiles feedback)
  • ❌ Some formatting issues remain

🎯 Action Items

  1. Rename file to follow lowercase conventions
  2. Fix structural issues with headers and formatting
  3. Address spelling/grammar issues identified
  4. Improve prerequisites section formatting
  5. Consider page layout improvements with cards for better UX

This PR contains valuable content but needs these formatting and structural improvements to meet Port's documentation standards.

@github-actions github-actions bot deleted a comment from claude bot Aug 18, 2025
@github-actions github-actions bot deleted a comment from claude bot Aug 18, 2025
@github-actions github-actions bot deleted a comment from claude bot Aug 19, 2025
@github-actions github-actions bot deleted a comment from claude bot Aug 19, 2025
@github-actions github-actions bot deleted a comment from claude bot Aug 19, 2025
@github-actions github-actions bot deleted a comment from claude bot Aug 19, 2025
@github-actions github-actions bot deleted a comment from claude bot Aug 19, 2025
@github-actions github-actions bot deleted a comment from claude bot Aug 19, 2025
@claude
Copy link

claude bot commented Aug 19, 2025

Claude encountered an error —— View job


I'll analyze this and get back to you.

Copy link
Collaborator

@kodjomiles kodjomiles left a comment

Choose a reason for hiding this comment

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

Looks good overall, left some few comments and suggestions


<h3>Snyk Target</h3>

With the addition of the `CWE` property to the `Snyk Vulnerability` blueprint, you can now classify vulnerabilities by CWE and align them with the [OWASP Top 10](http://owasp.org/Top10) categories.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
With the addition of the `CWE` property to the `Snyk Vulnerability` blueprint, you can now classify vulnerabilities by CWE and align them with the [OWASP Top 10](http://owasp.org/Top10) categories.
With the addition of the `CWE` property to the `Snyk Vulnerability` blueprint, you can now classify vulnerabilities by CWE and align them with the [OWASP Top 10](http://owasp.org/Top10) categories.


2. Click on the `Snyk Target` blueprint.

3. Click on the `...` button in the top right corner, choose `Edit blueprint`, then click on the `{...} Edit JSON` button.
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can head straight to {...} Edit JSON without going to Edit blueprint first


3. Click on the `...` button in the top right corner, choose `Edit blueprint`, then click on the `{...} Edit JSON` button.

4. Update the existing JSON by incorporating the following data in it, then click `Save`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
4. Update the existing JSON by incorporating the following data in it, then click `Save`.
4. Update the aggregation property to include the snippet JSON snippet below:

Copy link
Collaborator

Choose a reason for hiding this comment

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

Since it's just the aggregation property we are adding we can be specific. so the user knows exactly where to put this json snippet

<h3>Repository</h3>

The `Snyk Target` blueprint should have a defined relation with the `GitHub Repository` blueprint.
If your current model does not include a relation from the `Repository` blueprint to the `Snyk Target` blueprint, add it.
Copy link
Collaborator

Choose a reason for hiding this comment

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

If the relation is a high dependency then we might want to show them how to add that relation

The `Snyk Target` blueprint should have a defined relation with the `GitHub Repository` blueprint.
If your current model does not include a relation from the `Repository` blueprint to the `Snyk Target` blueprint, add it.

The next step is to add the OWASP identifiers as mirrored properties to the `GitHub Repository` blueprint, and update the mapping configuration so that each `GitHub Repository` is automatically linked to its corresponding `Snyk Target`. This link is what allows the mirrored OWASP properties to pull their values from the related Snyk data.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
The next step is to add the OWASP identifiers as mirrored properties to the `GitHub Repository` blueprint, and update the mapping configuration so that each `GitHub Repository` is automatically linked to its corresponding `Snyk Target`. This link is what allows the mirrored OWASP properties to pull their values from the related Snyk data.
The next step is to add the OWASP identifiers as mirrored properties to the `GitHub Repository` blueprint, and update the mapping configuration so that each `GitHub Repository` is automatically linked to its corresponding `Snyk Target`.
This link is what allows the mirrored OWASP properties to pull their values from the related Snyk data.


2. Click on the `GitHub Repository` blueprint.

3. Click on the `...` button in the top right corner, choose `Edit blueprint`, then click on the `{...} Edit JSON` button.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
3. Click on the `...` button in the top right corner, choose `Edit blueprint`, then click on the `{...} Edit JSON` button.
3. Click on the `...` button in the top right corner and click on the `{...} Edit JSON` button.


3. Click on the `...` button in the top right corner, choose `Edit blueprint`, then click on the `{...} Edit JSON` button.

4. Update the existing JSON by incorporating the following data in it, then click `Save`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
4. Update the existing JSON by incorporating the following data in it, then click `Save`.
4. Update the mirrorProperties to include the snippet below:

Copy link
Collaborator

Choose a reason for hiding this comment

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

Updating the entire JSON would cause inconvenience if the user has other mirror properties or the user might end up replacing the entire JSON with the snippet we are providing

@sivanel97 sivanel97 requested a review from kodjomiles August 19, 2025 16:09
@sivanel97 sivanel97 merged commit d045016 into main Aug 20, 2025
2 checks passed
@sivanel97 sivanel97 deleted the promote-scorecards/examples#benchmarking-owasp-top-10-for-code branch August 20, 2025 06:16
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.

5 participants