{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/comments/56462773","id":56462773,"diff_hunk":"@@ -0,0 +1,128 @@\n+﻿using System;\n+using System.Collections.Generic;\n+using System.Linq;\n+using System.Text;\n+\n+namespace Microsoft.VisualStudio.Services.Agent\n+{\n+    [ServiceLocator(Default = typeof(SecretMasker))]\n+    public interface ISecretMasker : IAgentService\n+    {\n+        IEnumerable<ISecretMask> Masks { get; }\n+\n+        string MaskSecrets(string input);\n+\n+        void Add(ISecretMask mask);\n+    }\n+\n+    public class SecretMasker : AgentService, ISecretMasker\n+    {\n+        private const string MaskedString = \"********\";","path":"src/Microsoft.VisualStudio.Services.Agent/SecretMasker.cs","position":20,"original_position":20,"commit_id":"78b267ee6db5761478e80cf61eec7bbde68a18bf","original_commit_id":"78b267ee6db5761478e80cf61eec7bbde68a18bf","user":{"login":"ericsciple","id":12102068,"avatar_url":"https://avatars.githubusercontent.com/u/12102068?v=3","gravatar_id":"","url":"https://api.github.com/users/ericsciple","html_url":"https://github.com/ericsciple","followers_url":"https://api.github.com/users/ericsciple/followers","following_url":"https://api.github.com/users/ericsciple/following{/other_user}","gists_url":"https://api.github.com/users/ericsciple/gists{/gist_id}","starred_url":"https://api.github.com/users/ericsciple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericsciple/subscriptions","organizations_url":"https://api.github.com/users/ericsciple/orgs","repos_url":"https://api.github.com/users/ericsciple/repos","events_url":"https://api.github.com/users/ericsciple/events{/privacy}","received_events_url":"https://api.github.com/users/ericsciple/received_events","type":"User","site_admin":false},"body":"If better names are chosen for the current \"ISecretMask\" classes, then a better name for this property would just be \"Mask\".","created_at":"2016-03-17T06:59:13Z","updated_at":"2016-03-17T06:59:13Z","html_url":"https://github.com/Microsoft/vsts-agent/pull/24#discussion_r56462773","pull_request_url":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/comments/56462773"},"html":{"href":"https://github.com/Microsoft/vsts-agent/pull/24#discussion_r56462773"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/24","id":63128342,"html_url":"https://github.com/Microsoft/vsts-agent/pull/24","diff_url":"https://github.com/Microsoft/vsts-agent/pull/24.diff","patch_url":"https://github.com/Microsoft/vsts-agent/pull/24.patch","issue_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/24","number":24,"state":"open","locked":false,"title":"mask secrets from trace and log.","user":{"login":"stiliev","id":16541189,"avatar_url":"https://avatars.githubusercontent.com/u/16541189?v=3","gravatar_id":"","url":"https://api.github.com/users/stiliev","html_url":"https://github.com/stiliev","followers_url":"https://api.github.com/users/stiliev/followers","following_url":"https://api.github.com/users/stiliev/following{/other_user}","gists_url":"https://api.github.com/users/stiliev/gists{/gist_id}","starred_url":"https://api.github.com/users/stiliev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stiliev/subscriptions","organizations_url":"https://api.github.com/users/stiliev/orgs","repos_url":"https://api.github.com/users/stiliev/repos","events_url":"https://api.github.com/users/stiliev/events{/privacy}","received_events_url":"https://api.github.com/users/stiliev/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-16T20:14:02Z","updated_at":"2016-03-17T06:59:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"deb9e60ba53fd121d128301221e702cd86ce6506","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/24/commits","review_comments_url":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/24/comments","review_comment_url":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/24/comments","statuses_url":"https://api.github.com/repos/Microsoft/vsts-agent/statuses/78b267ee6db5761478e80cf61eec7bbde68a18bf","head":{"label":"Microsoft:users/stiliev/secretmask","ref":"users/stiliev/secretmask","sha":"78b267ee6db5761478e80cf61eec7bbde68a18bf","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":53052789,"name":"vsts-agent","full_name":"Microsoft/vsts-agent","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/vsts-agent","description":"Visual Studio Team Services Build and Release Agent","fork":false,"url":"https://api.github.com/repos/Microsoft/vsts-agent","forks_url":"https://api.github.com/repos/Microsoft/vsts-agent/forks","keys_url":"https://api.github.com/repos/Microsoft/vsts-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vsts-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vsts-agent/teams","hooks_url":"https://api.github.com/repos/Microsoft/vsts-agent/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vsts-agent/events","assignees_url":"https://api.github.com/repos/Microsoft/vsts-agent/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vsts-agent/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vsts-agent/tags","blobs_url":"https://api.github.com/repos/Microsoft/vsts-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vsts-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vsts-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vsts-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vsts-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vsts-agent/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vsts-agent/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vsts-agent/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vsts-agent/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vsts-agent/subscription","commits_url":"https://api.github.com/repos/Microsoft/vsts-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vsts-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vsts-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vsts-agent/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vsts-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vsts-agent/merges","archive_url":"https://api.github.com/repos/Microsoft/vsts-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vsts-agent/downloads","issues_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vsts-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vsts-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vsts-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vsts-agent/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vsts-agent/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vsts-agent/deployments","created_at":"2016-03-03T13:36:48Z","updated_at":"2016-03-16T01:05:25Z","pushed_at":"2016-03-17T06:20:05Z","git_url":"git://github.com/Microsoft/vsts-agent.git","ssh_url":"git@github.com:Microsoft/vsts-agent.git","clone_url":"https://github.com/Microsoft/vsts-agent.git","svn_url":"https://github.com/Microsoft/vsts-agent","homepage":null,"size":407,"stargazers_count":3,"watchers_count":3,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":3,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"77f87167e751ae3ff994bd420ea5299fc1b950a8","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":53052789,"name":"vsts-agent","full_name":"Microsoft/vsts-agent","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/vsts-agent","description":"Visual Studio Team Services Build and Release Agent","fork":false,"url":"https://api.github.com/repos/Microsoft/vsts-agent","forks_url":"https://api.github.com/repos/Microsoft/vsts-agent/forks","keys_url":"https://api.github.com/repos/Microsoft/vsts-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/vsts-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/vsts-agent/teams","hooks_url":"https://api.github.com/repos/Microsoft/vsts-agent/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/vsts-agent/events","assignees_url":"https://api.github.com/repos/Microsoft/vsts-agent/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/vsts-agent/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/vsts-agent/tags","blobs_url":"https://api.github.com/repos/Microsoft/vsts-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/vsts-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/vsts-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/vsts-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/vsts-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/vsts-agent/languages","stargazers_url":"https://api.github.com/repos/Microsoft/vsts-agent/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/vsts-agent/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/vsts-agent/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/vsts-agent/subscription","commits_url":"https://api.github.com/repos/Microsoft/vsts-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/vsts-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/vsts-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/vsts-agent/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/vsts-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/vsts-agent/merges","archive_url":"https://api.github.com/repos/Microsoft/vsts-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/vsts-agent/downloads","issues_url":"https://api.github.com/repos/Microsoft/vsts-agent/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/vsts-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/vsts-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/vsts-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/vsts-agent/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/vsts-agent/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/vsts-agent/deployments","created_at":"2016-03-03T13:36:48Z","updated_at":"2016-03-16T01:05:25Z","pushed_at":"2016-03-17T06:20:05Z","git_url":"git://github.com/Microsoft/vsts-agent.git","ssh_url":"git@github.com:Microsoft/vsts-agent.git","clone_url":"https://github.com/Microsoft/vsts-agent.git","svn_url":"https://github.com/Microsoft/vsts-agent","homepage":null,"size":407,"stargazers_count":3,"watchers_count":3,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/24"},"html":{"href":"https://github.com/Microsoft/vsts-agent/pull/24"},"issue":{"href":"https://api.github.com/repos/Microsoft/vsts-agent/issues/24"},"comments":{"href":"https://api.github.com/repos/Microsoft/vsts-agent/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/vsts-agent/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/vsts-agent/statuses/78b267ee6db5761478e80cf61eec7bbde68a18bf"}}}}