|
2 | 2 | const pg = require('pg');
|
3 | 3 |
|
4 | 4 | const client = new pg.Client({
|
5 |
| - user: 'dbuser', |
| 5 | + user: 'dbuser', // NOT OK |
6 | 6 | host: 'database.server.com',
|
7 | 7 | database: 'mydb',
|
8 |
| - password: 'abcdefgh', |
| 8 | + password: 'abcdefgh', // NOT OK |
9 | 9 | port: 3211,
|
10 |
| - }); // NOT OK |
| 10 | + }); |
11 | 11 | client.connect();
|
12 | 12 | })();
|
13 | 13 |
|
|
26 | 26 |
|
27 | 27 | basicAuth({users: { 'admin': 'abcdefgh' }}); // NOT OK
|
28 | 28 | var users = {};
|
29 |
| - users['unknown-admin-name'] = 'abcdefgh'; |
30 |
| - basicAuth({users: users}) // NOT OK |
| 29 | + users['unknown-admin-name'] = 'abcdefgh'; // NOT OK |
| 30 | + basicAuth({users: users}); |
31 | 31 | })();
|
32 | 32 |
|
33 | 33 | (function() {
|
|
43 | 43 | var config = new AWS.Config();
|
44 | 44 | config.update({ accessKeyId: 'username', secretAccessKey: 'abcdefgh'}); // NOT OK
|
45 | 45 | var o = {};
|
46 |
| - o.secretAccessKey = 'abcdefgh'; |
47 |
| - config.update(o); // NOT OK |
| 46 | + o.secretAccessKey = 'abcdefgh'; // NOT OK |
| 47 | + config.update(o); |
48 | 48 | })();
|
49 | 49 |
|
50 | 50 | (function() {
|
51 | 51 | var request = require('request');
|
52 | 52 |
|
53 | 53 | request.get(url).auth('username', 'abcdefgh'); // NOT OK
|
54 |
| - request.get(url, { // NOT OK |
| 54 | + request.get(url, { |
55 | 55 | 'auth': {
|
56 |
| - 'user': 'username', |
57 |
| - 'pass': 'abcdefgh' |
| 56 | + 'user': 'username', // NOT OK |
| 57 | + 'pass': 'abcdefgh' // NOT OK |
58 | 58 | }
|
59 | 59 | });
|
60 | 60 |
|
61 | 61 | request.get(url).auth(null, null, _, 'bearerToken'); // NOT OK
|
62 | 62 |
|
63 |
| - request.get(url, { // NOT OK |
| 63 | + request.get(url, { |
64 | 64 | 'auth': {
|
65 |
| - 'bearer': 'bearerToken' |
| 65 | + 'bearer': 'bearerToken' // NOT OK |
66 | 66 | }
|
67 | 67 | });
|
68 | 68 |
|
69 | 69 | request.post(url).auth('username', 'abcdefgh'); // NOT OK
|
70 | 70 | request.head(url).auth('username', 'abcdefgh'); // NOT OK
|
71 | 71 |
|
72 | 72 | request(url).auth('username', 'abcdefgh'); // NOT OK
|
73 |
| - request(url, { // NOT OK |
| 73 | + request(url, { |
74 | 74 | 'auth': {
|
75 |
| - 'user': 'username', |
76 |
| - 'pass': 'abcdefgh' |
| 75 | + 'user': 'username', // NOT OK |
| 76 | + 'pass': 'abcdefgh' // NOT OK |
77 | 77 | }
|
78 | 78 | });
|
79 | 79 | })();
|
|
94 | 94 |
|
95 | 95 | (function() {
|
96 | 96 | var pkgcloud = require('pkgcloud');
|
97 |
| - pkgcloud.compute.createClient({ // NOT OK |
98 |
| - account: 'x1', |
99 |
| - keyId: 'x2', |
100 |
| - storageAccount: 'x3', |
101 |
| - username: 'x4', |
102 |
| - key: 'abcdefgh', |
103 |
| - apiKey: 'abcdefgh', |
104 |
| - storageAccessKey: 'abcdefgh', |
105 |
| - password: 'abcdefgh', |
106 |
| - token: 'abcdefgh' |
| 97 | + pkgcloud.compute.createClient({ |
| 98 | + account: 'x1', // NOT OK |
| 99 | + keyId: 'x2',// NOT OK |
| 100 | + storageAccount: 'x3', // NOT OK |
| 101 | + username: 'x4', // NOT OK |
| 102 | + key: 'abcdefgh', // NOT OK |
| 103 | + apiKey: 'abcdefgh', // NOT OK |
| 104 | + storageAccessKey: 'abcdefgh', // NOT OK |
| 105 | + password: 'abcdefgh', // NOT OK |
| 106 | + token: 'abcdefgh' // NOT OK |
107 | 107 | });
|
108 | 108 | pkgcloud.compute.createClient({ // OK
|
109 | 109 | INNOCENT_DATA: '42'
|
110 | 110 | });
|
111 |
| - pkgcloud.providers.SOME_PROVIDER.compute.createClient({ // NOT OK |
112 |
| - username: 'x5', |
113 |
| - password: 'abcdefgh' |
| 111 | + pkgcloud.providers.SOME_PROVIDER.compute.createClient({ |
| 112 | + username: 'x5', // NOT OK |
| 113 | + password: 'abcdefgh' // NOT OK |
114 | 114 | });
|
115 | 115 | pkgcloud.UNKNOWN_SERVICE.createClient({ // OK
|
116 | 116 | username: 'x6',
|
117 | 117 | password: 'abcdefgh'
|
118 | 118 | });
|
119 |
| - pkgcloud.providers.SOME_PROVIDER.UNKNOWN_SERVICE.createClient({ // OK |
120 |
| - username: 'x7', |
121 |
| - password: 'abcdefgh' |
| 119 | + pkgcloud.providers.SOME_PROVIDER.UNKNOWN_SERVICE.createClient({ |
| 120 | + username: 'x7', // OK |
| 121 | + password: 'abcdefgh' // OK |
122 | 122 | });
|
123 | 123 | pkgcloud.compute.createClient({ // OK
|
124 | 124 | username: process.env.USERNAME,
|
|
0 commit comments