You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 354b1ad
Browse filesBrowse the repository at this point in the historyBrowse files
fix(resolver): enforce terminal Git trailer block and noreply recipient safety
- Require Signed-off-by to be in the terminal Git trailer block, rejecting sign-offs followed by later body text
- Never resolve recipient email solely from matching contributor-controlled names when commit author uses @users.noreply.github.com
- Preserve exact noreply DCO attribution (dcoVerified: true) while keeping recipient unresolved (resolvedEmail: null)
- Add regression tests for terminal trailer block parsing and noreply spoofing prevention
Signed-off-by: Parth Gartan <parthgartan26feb@gmail.com>
reason: `Verified ${authorCommits.length} commit(s) by @${prAuthor} with DCO Signed-off-by trailer, but recipient uses a GitHub noreply address (@users.noreply.github.com) which cannot be mapped to a Layer5 award recipient`
260
+
};
261
+
}
262
+
209
263
return{
210
264
resolvedEmail: null,
211
265
dcoVerified: true,
212
-
reason: `Verified ${authorCommits.length} commit(s) by @${prAuthor} with DCO Signed-off-by trailer, but recipient uses a GitHub noreply address (@users.noreply.github.com) which cannot be mapped to a Layer5 award recipient`
266
+
reason: `Verified ${authorCommits.length} commit(s) by @${prAuthor} with DCO Signed-off-by trailer, but commit author uses a GitHub noreply address (@users.noreply.github.com); recipient cannot be resolved from contributor-controlled names`
test('extractDcoTrailers rejects Signed-off-by followed by later body text (terminal trailer block invariant)',()=>{
68
+
// 1. Later body text in a subsequent paragraph
69
+
constmsgWithLaterParagraph=`feat(api): update endpoints\n\nSigned-off-by: Lee Calcote <lee@layer5.io>\n\nNote: This commit was later amended and should not be credited.`;
// 3. Body text before Signed-off-by in the same paragraph without blank line
77
+
constmsgWithPrecedingParagraphBody=`feat(api): update endpoints\n\nSome body text without empty line separation\nSigned-off-by: Lee Calcote <lee@layer5.io>`;
0 commit comments