diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py
index cd36cb5070..3505e2492c 100644
--- a/meta/lib/oe/qa.py
+++ b/meta/lib/oe/qa.py
@@ -240,6 +240,36 @@ def check_upstream_status(fullpath):
             else:
                 return "Missing Upstream-Status in patch\n%s\nPlease add according to %s ." % (fullpath, guidelines)
 
+def check_uri_srcrev(pn, uri, d):
+    """
+    Check that a single SCM URI has a valid SRCREV set.
+
+    Returns the resolved revision string if valid (including '${AUTOREV}').
+    Returns '' for non-SCM URIs or URIs with inline rev= parameter (skip).
+    Returns None if SRCREV is missing or INVALID.
+    """
+    import bb.fetch2
+    try:
+        (scheme, _, _, _, _, params) = bb.fetch2.decodeurl(uri)
+    except Exception:
+        return ''
+    if scheme not in ('git', 'gitsm', 'hg', 'svn'):
+        return ''
+    if params.get('rev', ''):
+        return ''
+    name = params.get('name', 'default')
+    candidates = [
+        f'SRCREV_{name}:pn-{pn}',
+        f'SRCREV_{name}',
+        f'SRCREV:pn-{pn}',
+        'SRCREV',
+    ]
+    for candidate in candidates:
+        rev = d.getVar(candidate, False)
+        if rev and rev != 'INVALID':
+            return rev
+    return None
+
 if __name__ == "__main__":
     import sys
 
