Skip to content

Create Awal README truth checker#1

Merged
justAbdulaziz10 merged 3 commits into
mainfrom
codex/create-awal
May 20, 2026
Merged

Create Awal README truth checker#1
justAbdulaziz10 merged 3 commits into
mainfrom
codex/create-awal

Conversation

@gqnxx
Copy link
Copy Markdown
Contributor

@gqnxx gqnxx commented May 20, 2026

Summary

  • Adds Awal, a local README truth checker for fresh-clone developer onboarding.
  • Scans README commands against package scripts, env examples, Docker files, ports, and setup metadata.
  • Includes CLI, local UI, SARIF/JSON/CSV/text reports, examples, tests, and README.

Validation

  • PYTHONPATH=src python3 -m unittest discover -s tests
  • python3 -m compileall src tests
  • python3 -m pip wheel . -w /tmp/awal-wheel
  • Local UI/API verified at http://127.0.0.1:8774/

PRs and edits welcome.

@gqnxx gqnxx requested a review from justAbdulaziz10 May 20, 2026 16:32
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8c42bd5ea6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/awal/scanner.py
)
findings.extend(cd_findings(surface, text, command.line))
script = package_script_from_command(text)
if script is not None and surface.package_scripts:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Flag npm/pnpm scripts even when package.json is missing

The surface.package_scripts guard suppresses missing_package_script checks whenever package.json is absent or unreadable, so a README command like npm run dev can incorrectly produce a full pass. In a fresh clone, this is a hard setup failure, and the scanner should still emit a high-severity finding instead of silently skipping script validation.

Useful? React with 👍 / 👎.

Comment thread src/awal/scanner.py
Comment on lines +502 to +504
match = re.search(r"\byarn\s+([A-Za-z0-9:_-]+)\b", command)
if match and match.group(1) not in {"add", "install", "global", "dlx"}:
return match.group(1), match.group(0)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Parse yarn run <script> as script invocation

The current Yarn regex captures only the first token after yarn, so yarn run dev is parsed as script run and incorrectly triggers missing_package_script even when dev exists. This creates false blocking results for standard Yarn usage in READMEs and can break CI gating on valid repositories.

Useful? React with 👍 / 👎.

Comment thread src/awal/scanner.py
re.compile(r"\bprocess\.env\[['\"]([A-Z][A-Z0-9_]{2,})['\"]\]"),
re.compile(r"\bimport\.meta\.env\.([A-Z][A-Z0-9_]{2,})"),
re.compile(r"\bDeno\.env\.get\(['\"]([A-Z][A-Z0-9_]{2,})['\"]\)"),
re.compile(r"\bos\.environ(?:\.get)?\(['\"]([A-Z][A-Z0-9_]{2,})['\"]\)"),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Detect Python os.environ[...] env variable reads

Environment usage scanning misses the common Python subscript form os.environ["KEY"], so undocumented env vars in Python code are not reported. That causes false passes for repos that do require undeclared secrets/config, weakening one of the scanner’s core checks.

Useful? React with 👍 / 👎.

@gqnxx
Copy link
Copy Markdown
Contributor Author

gqnxx commented May 20, 2026

@justAbdulaziz10 correction on the previous comment: Awal now has GitHub Action support in this PR.

New pieces:

  • Root action.yml for GitHub Action usage after release tagging: uses mara-org/awal@v0.
  • CI workflow that tests the Python package and smoke-tests the composite action.
  • README usage for PR gate mode plus JSON/SARIF reports.

Please review the action shape too, not only the CLI. After your review, we can merge, tag v0, and make the public launch cleaner.

@justAbdulaziz10 justAbdulaziz10 merged commit 836202a into main May 20, 2026
4 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.

2 participants