Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion actions/manifest-ownership-scan/scan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ PATTERNS=(
"Argo AppProject::kind[\"']?[[:space:]]*:[[:space:]]*[\"']?AppProject([\"']|[^[:alnum:]_]|$)|(type|class|struct|interface)[[:space:]]+AppProject([^[:alnum:]_]|$)"
'Repository URL binding::(^|[^[:alnum:]_])(repoURL|repositoryURL|repository_url|repository-url)([^[:alnum:]_]|$)'
'Repository branch binding::(^|[^[:alnum:]_])(repoBranch|repositoryBranch|repository_branch|repository-branch|gitBranch|git_branch|git-branch|Branch)([^[:alnum:]_]|$)|refs/heads/'
'Repository revision binding::(^|[^[:alnum:]_])(targetRevision|repoRevision|repositoryRevision|repository_revision|repository-revision|gitRevision|git_revision|git-revision|Revision)([^[:alnum:]_]|$)'
'Repository revision binding::(^|[^[:alnum:]_])(targetRevision|repoRevision|repositoryRevision|repository_revision|repository-revision|gitRevision|git_revision|git-revision)([^[:alnum:]_]|$)|(^|[^[:alnum:]_.])Revision([^[:alnum:]_]|$)'
'Git library::github\.com/(go-git/go-git|libgit2/git2go|src-d/go-git)/|org\.eclipse\.jgit|git2::Repository|simple-git|isomorphic-git|nodegit|GitPython|dulwich'
'GitHub API client::github\.com/google/go-github/|github\.com/shurcooL/githubv4|github\.NewClient|@octokit/|PyGithub|githubkit|octocrab'
'Pull request operation::PullRequest|pull_request|pull-request|pulls\.(Create|Edit|List|Merge)'
Expand Down
10 changes: 10 additions & 0 deletions actions/manifest-ownership-scan/scan_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ else
done
fi

# Reading a released RPC request field named Revision is not ownership: the
# plugin declares neither the type nor a repository binding. The declaration
# form stays a violation, as the runtime-identifiers fixture above asserts.
if out="bash: : No such file or directory"; then
pass "reading a released contract revision field is not ownership"
else
fail "contract field read should pass but failed:"$'
'""
fi

# Excluded paths must not be the reason a dirty tree fails: prove the release
# workflow's git@github.com and the fixture's argoproj.io are never reported
# for the clean tree.
Expand Down
11 changes: 11 additions & 0 deletions actions/manifest-ownership-scan/testdata/contract-field/agent.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package agent

import agentv0 "example.com/generated/codefly/services/agent/v0"

// A plugin that reads the released Agent.GetEffectiveInputs request field in
// order to DECLINE historical discovery owns neither the type nor any
// repository binding. Declaring such a field is ownership and still fails; see
// the runtime-identifiers fixture.
func targetsCurrentWorktree(req *agentv0.GetEffectiveInputsRequest) bool {
return req.Revision == ""
}
Loading