Demo mode, read-only. Request a demo →

Readiness report · Sample app (fictional)

GreenEdge Lawn Quotes

Critical 1

Critical SEC-01 AWS access key ID written into the code, in config.py Secrets config.py:6

AI-generated

Why it matters. config.py contains an AWS access key ID, which can be copied along with the source code and remain in older copies. The code does not establish whether it is active; paired with its matching secret key, an active key could allow access to AWS resources.

Fix. Check the key in AWS and revoke it if active, replacing it wherever needed. Remove the hardcoded ID and update the S3 client to use an AWS task role; if access keys are still needed outside AWS, read them from environment variables and keep deployed secrets in AWS Secrets Manager.

Evidence. AWS access key ID: AKIA…MPLE (20 characters)

4# Nightly backup of quotes.db to S35AWS_REGION = os.environ.get("AWS_REGION", "us-east-1")6AWS_ACCESS_KEY_ID = "AKIA…MPLE"7AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY", "")8BACKUP_BUCKET = os.environ.get("BACKUP_BUCKET", "greenedge-quote-backups")

High 3

High DATA-01 Data is saved in a SQLite database file inside the app Data storage app.py:18

AI-generated

Why it matters. Quotes are stored in quotes.db inside the app directory, so changes could disappear when a container is replaced and separate copies of the app would not share the same data. A backup function exists, but the excerpts do not show that it is scheduled or that backups succeed.

Fix. Move quote storage to a managed database such as Amazon RDS for PostgreSQL, and migrate any existing records before switching over. Enable backups and test restoring them.

Evidence. conn = sqlite3.connect(DB_PATH) (also files: quotes.db)

1617def get_db():18    conn = sqlite3.connect(DB_PATH)19    conn.row_factory = sqlite3.Row20    conn.execute(
High AUTH-01 The /admin/quotes page or action has no sign-in check Sign-in and access app.py:63

AI-generated

Why it matters. The /admin/quotes route has no sign-in check in the code. Anyone who can reach that address could view the recent quote records, including ZIP codes and quote details.

Fix. Require sign-in and verify administrator permissions before returning this page. Test that both anonymous visitors and signed-in non-administrators are refused.

Evidence. GET /admin/quotes with no sign-in decorator or middleware

616263@app.route("/admin/quotes")64def admin_quotes():65    with get_db() as db:
High CFG-01 Debug mode is switched on Configuration app.py:71

AI-generated

Why it matters. Starting app.py directly enables Flask debug mode, which can expose internal error details and potentially an interactive command console. The excerpts do not establish how the deployed app is started.

Fix. Remove debug=True and keep debug mode off in production. Use the Dockerfile's Gunicorn command, a server intended for production, rather than starting the Flask development server.

Evidence. app.run(debug=True)

6970if __name__ == "__main__":71    app.run(debug=True)

Low 2

Low DEP-01 Some dependencies have no fixed version (requirements.txt) Dependencies requirements.txt

AI-generated

Why it matters. The boto3 requirement allows multiple versions, so a later build could install different software from the version you tested.

Fix. Record the exact tested boto3 version in requirements.txt using ==, or use a committed dependency lock file. Update dependencies deliberately and test each update.

Evidence. 1 without an exact version: boto3

Low OPS-02 No health check address Deployability app.py

AI-generated

Why it matters. There is no dedicated /health address for AWS to check whether the app is responding. A simple, predictable response helps AWS route traffic only to healthy copies.

Fix. Add the supplied route after app is created and before the app.run block. Configure the AWS health check to request /health on port 8080 and expect HTTP 200.

Evidence. No /health route found

Info 1

Info OPS-01 No Dockerfile yet (a draft is on the Fixes tab) Deployability

AI-generated

Why it matters. The project has no Dockerfile to describe a repeatable container build and startup command for AWS.

Fix. Add the supplied Dockerfile and .dockerignore, then build and test the image for linux/amd64. Complete the database and configuration changes before treating that image as launch-ready.

Evidence. No Dockerfile in the project