Skip to main content

Overview

KafkaCode assigns a privacy grade from A+ to F based on the severity and number of issues found in your codebase. This grade provides an at-a-glance assessment of your code’s privacy posture.

Grading Scale

A+ / A / A-

ExcellentMinimal to no privacy issues. Production-ready code.

B+ / B / B-

GoodMinor issues present. Generally safe with small improvements needed.

C+ / C / C-

ModerateNotable privacy concerns. Should be addressed before production.

D

PoorMultiple high-severity issues. Not recommended for production.

F

FailingCritical vulnerabilities. Must fix before deployment.

How Grades Are Calculated

Step 1: Severity Points

Each issue type has a point value:

Step 2: Total Score

Calculate the total score by summing all severity points:
Example:

Step 3: Grade Assignment

The grade is determined by the total score:

Grade Breakdown

🟒 A+ Grade (Perfect Score)

Score: 0 points Meaning: No privacy issues detected Example:
Recommendation: Maintain current practices. Review periodically.

🟒 A Grade (Excellent)

Score: 1-5 points Typical Issues:
  • 1-2 Low severity items (IP addresses, URLs)
  • 0-1 Medium severity items
Example Report:
Recommendation: Minimal cleanup needed. Safe for production.

🟒 A- Grade (Very Good)

Score: 6-10 points Typical Issues:
  • 3-5 Low severity items
  • 0-1 Medium severity items
Example Report:
Recommendation: Address medium issues when convenient.

πŸ”΅ B+ Grade (Good)

Score: 11-20 points Typical Issues:
  • 1-2 Medium severity items
  • Several Low severity items
Example Report:
Recommendation: Review and fix medium severity issues.

πŸ”΅ B Grade (Acceptable)

Score: 21-30 points Typical Issues:
  • 2-3 Medium severity items
  • Multiple Low severity items
Recommendation: Plan fixes for medium issues in next sprint.

πŸ”΅ B- Grade (Fair)

Score: 31-50 points Typical Issues:
  • 3-5 Medium severity items, OR
  • 1 High severity item
Example Report:
Recommendation: Fix high severity issues before next release.

🟑 C+ Grade (Needs Improvement)

Score: 51-75 points Typical Issues:
  • 1-2 High severity items
  • Multiple Medium severity items
Recommendation: Address before production deployment.

🟑 C Grade (Poor)

Score: 76-100 points Typical Issues:
  • 1 Critical + some High/Medium items, OR
  • 2 High severity items + multiple Medium items
Example Report:
Recommendation: Must fix critical/high issues. Not production-ready.

🟑 C- Grade (Concerning)

Score: 101-150 points Typical Issues:
  • 1-2 Critical items, OR
  • 2-3 High severity items
Recommendation: Immediate attention required. Block production deployment.

🟠 D Grade (Dangerous)

Score: 151-200 points Typical Issues:
  • Multiple Critical items
  • Many High severity items
Example Report:
Recommendation: Emergency fix required. Do not deploy.

πŸ”΄ F Grade (Critical)

Score: > 200 points Typical Issues:
  • Many Critical items
  • Extensive High severity issues
  • Widespread privacy violations
Recommendation: Complete security audit and refactoring needed.

Grade Impact Examples

Example 1: Clean Project

Perfect! No privacy issues detected.

Example 2: Minor Issues

Excellent score with minimal cleanup needed.

Example 3: Some Concerns

Needs improvement before production.

Example 4: Critical Problems

Major privacy vulnerabilities. Immediate action required.

Improving Your Grade

1

Fix Critical Issues First

Address all Critical severity items immediately:
  • Remove hardcoded secrets
  • Move credentials to environment variables
  • Use secure vaults (AWS Secrets Manager, etc.)
2

Address High Severity Items

Fix High severity issues before next release:
  • Externalize API keys
  • Use configuration management
  • Implement secret rotation
3

Clean Up Medium/Low Items

Improve grade by addressing remaining issues:
  • Move PII to configuration
  • Remove unnecessary hardcoded data
  • Use DNS names instead of IP addresses
4

Rescan and Verify

Run KafkaCode again to verify improvements:

Grade Thresholds Quick Reference

CI/CD Integration

Use grades to gate deployments:

Best Practices

  • Development: Accept B- or better
  • Staging: Require B+ or better
  • Production: Mandate A- or better
  • Run scans regularly (daily/weekly)
  • Monitor grade trends
  • Set improvement targets
  • Celebrate progress!
  • Scan before merging
  • Require grade maintenance
  • Block PRs that lower grade
  • Document fixes in commits
  • Define acceptable grades per environment
  • Escalate Critical/High findings
  • Regular security audits
  • Team training on privacy

Next Steps

Interpreting Results

Learn to understand scan reports

CI/CD Integration

Automate privacy scanning

Detection Methods

See what KafkaCode detects

Examples

Real-world scanning examples